DaveLinger Posted October 1, 2006 Share Posted October 1, 2006 So I'm currently in the stage of moving all of my old table driven layout stuff to divs. I have the basic jist of it, I think, but I have one problem so far. If I have 2 objects set up like this...[code]<div id="web_sites">Stuff</div><iframe id="web_window" frameborder="0">Other stuff</iframe>[/code]CSS:[code]#web_sites { border:1px solid #ccc; padding:3px; align:left; width:150px; height:210px; }#web_window { position: relative; top: -218px; left: 157px; border:1px solid #ccc; align:right; width:532px; height:600px; }[/code]That does what I want it to do. I want the "web_sites" div on the left, and the "web_window" on the right. The only problem is that it leaves the white space where the "web_window" WOULD HAVE BEEN if I hadn't moved it, making my page longer than it needs to be. Here's the link: http://www.davelinger.com/web/index.phpThanks! Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted October 1, 2006 Share Posted October 1, 2006 Dont use positioning. Learn to use float.Basically remove any positioning you have. The float #web_sites and #web_window left:[code]#web_sites, #web_window { float: left;}[/code]Now you want to clear the floats by adding clear: both to #footer Quote Link to comment Share on other sites More sharing options...
DaveLinger Posted October 1, 2006 Author Share Posted October 1, 2006 works great, thanks. :D Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.