zeeshan_haider000 Posted April 18, 2009 Share Posted April 18, 2009 Hi, When i have two div id items, div#1 is floated to the right while div#2 to the left, the problem is that when i input a new div after the above divs, the new div shows up underneath the above divs? i haven't used 'position' param for any of the above divs... here is the code: #headright { padding: 10px; float: right; width: 300px; height: 400px; outline: solid #0000CC; outline-width: 1px; background: inherit; overflow: hidden; margin: 0 auto; } #headleft { padding: 10px; float: left; width: 590px; height: 400px; outline: solid #666666; outline-width: 1px; background: inherit; margin: 0 auto; } #footer { width: auto; text-align: center; vertical-align: middle; background: #000000; color: #CCCCCC; font-size: 12px; text-transform: capitalize; margin: 10px auto auto auto; padding: 10px; } Link to comment https://forums.phpfreaks.com/topic/154594-solved-float-positioning/ Share on other sites More sharing options...
Axeia Posted April 18, 2009 Share Posted April 18, 2009 you'll need to float the third one as well if you want it to be next to it. Link to comment https://forums.phpfreaks.com/topic/154594-solved-float-positioning/#findComment-813093 Share on other sites More sharing options...
zeeshan_haider000 Posted April 18, 2009 Author Share Posted April 18, 2009 you'll need to float the third one as well if you want it to be next to it. Oh i solved it, i removed the line "float:left" from #headleft and it worked. Link to comment https://forums.phpfreaks.com/topic/154594-solved-float-positioning/#findComment-813199 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.