:: Forum >>

button position

If I place an AW button next to a 'normal' button, the AW button is positioned slightly lower than the normal button. The effect is more exagerated in IE, but it's visible in Firefox also.

Is there anyway around this without using absolute positioning?

Sample code:

<input type="button" value="normal button">

<script>
var obj = new AW.UI.Button;
obj.setId("myButton");
obj.setControlText("Position Example");
obj.setControlImage("search");
document.write(obj);
</script>
Chris Morgan
Friday, January 20, 2006
I suggest using only one or the other button type as they look different and your users will notice this. And if you only use AW buttons then you have th ability to change the look and feel of your page easily by changing the skin you use. There are a lot of benefits to sticking to just using the AW buttons.

Sorry, I forgot to answer your question. I don't know of a quick fix to keeping them aligned the same unless you create a CSS class that nudges the AW button in the direction it needs to go to line up and apply that class to all of your AW buttons.

<style>
.aw-mybutton-nudge { margin-top : -5!important }
</style>

obj.setClass("myButton","nudge");

Jim Hunter
Friday, January 20, 2006
All AW controls are aligned to the middle of the line using vertical-align:middle rule. To align them with a standard button either put AW button to the top -

#myButton {vertical-align: top}

or the standard one to the middle :-)

input {vertical-align: middle}
Alex (ActiveWidgets)
Friday, January 20, 2006

This topic is archived.


Back to support forum

Forum search