Positioning inline elements with CSS -


i position #mylabel on far left of #mydiv, , #mya on far right of #mydiv, , keep them on same line. understand can make #mylabel , #mya block elements , floating them left , right. there more suitable way this?

<div id="mydiv" style="width:500px">    <label id="mylabel">my label</label>    <a id="mya" href="clickme.html">click me</a> </div> 

floating should work fine, use absolute positioning.

#mydiv {     position: relative; } #mylabel {     position: absolute;     left: 0; } #mya {     position: absolute;     right: 0; } 

http://jsfiddle.net/explosionpills/gacqp/1/


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -