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; } 
Comments
Post a Comment