aeroswat Posted February 1, 2010 Share Posted February 1, 2010 Should this not start the absolutely positioned divs after div #1 despite the positioning being higher than div #1?? <div id="numone">1</div> <div id="container" style="position:relative"> <div style="position:absolute;top:5">a</div> <div style="position:absolute;top:20">b</div> </div> Link to comment https://forums.phpfreaks.com/topic/190565-am-i-wrong-in-my-assumption-about-positioning/ Share on other sites More sharing options...
haku Posted February 2, 2010 Share Posted February 2, 2010 Probably. Depends on what else you have in your CSS. Link to comment https://forums.phpfreaks.com/topic/190565-am-i-wrong-in-my-assumption-about-positioning/#findComment-1005273 Share on other sites More sharing options...
SuperBlue Posted February 4, 2010 Share Posted February 4, 2010 Should this not start the absolutely positioned divs after div #1 despite the positioning being higher than div #1?? <div id="numone">1</div> <div id="container" style="position:relative"> <div style="position:absolute;top:5">a</div> <div style="position:absolute;top:20">b</div> </div> Remember to use valid unit of measurement when you set the position of elements. I.e. PX, EM, % <!DOCTYPE html> <html lang="en-US"> <head> <title>My first Website</title> </head> <body> <div id="numone">1</div> <div id="container" style="position:relative;"> <div style="position:absolute;top:5px;">a</div> <div style="position:absolute;top:55px;">b</div> </div> </body> </html> Link to comment https://forums.phpfreaks.com/topic/190565-am-i-wrong-in-my-assumption-about-positioning/#findComment-1006728 Share on other sites More sharing options...
otuatail Posted February 4, 2010 Share Posted February 4, 2010 if you want a dive to align itself next (to the right) of the first then #1 needs to be a float:left Desmond. Link to comment https://forums.phpfreaks.com/topic/190565-am-i-wrong-in-my-assumption-about-positioning/#findComment-1006838 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.