...

View Full Version : Overlapping <div>'s



LukeSkope
07-25-2007, 09:36 PM
here is my page

http://thefluidimage.com/colabi/

everything is working right, except, when the user makes their browser very thin, the <div> on the top right overlaps the <div> on the top left.

Can someone please look at my code and help me eliminate this overlapping.

if you are curious, I found this page
http://www.maxdesign.com.au/presentation/liquid/example02.htm

and used that as my starting point for creating this particular liquid layout.

thanks
Luke

VIPStephan
07-25-2007, 09:56 PM
Put all your content into a container and assign a minimum width to it:


<body>
<div id="container">
<div id="headerR"></div>
<div id="headerL">
<div id="headerLCorner"></div>
</div>
<div id="loginNav"><span>welcome</span> <span>login</span> <span>new account</span></div>
<div id="textNav">
</div>
<div id="nav">
<div id="navTopRound"></div>
</div>
<div id="content">
<div id="contentTopRoundL"></div>
<div id="contentTopRoundR"></div>
<div id="imgPlaceHolder" style="width:300px; height:300px; background-color:#FF0000;"></div><br/>
<div id="imgPlaceHolder2" style="width:300px; height:300px; background-color:#00FF00;"></div>
</div>
<div id="footer">footer</div>
</div>
</body>


Also you should look at this:

http://www.boagworld.com/archives/2005/11/semantic_code_what_why_how.html
http://brainstormsandraves.com/articles/semantics/structure/

Jutlander
07-25-2007, 10:07 PM
By minimum width I take it you mean the min-width property...? IE 6 doesn't support it, nor min-height, max-width, and max-height, unfortunately. I'd advice not to use min-width, because a fair deal of users still browse with IE 6.

_Aerospace_Eng_
07-25-2007, 10:16 PM
By minimum width I take it you mean the min-width property...? IE 6 doesn't support it, nor min-height, max-width, and max-height, unfortunately. I'd advice not to use min-width, because a fair deal of users still browse with IE 6.

However there are plenty of workarounds. Some may not be to your liking and some may not be semantically correct but they work.

http://www.pmob.co.uk/temp/min-width-ie.htm (does work but may not work for your layout)

This also works

body {
width:expression( documentElement.clientWidth < 800 ? (documentElement.clientWidth == 0 ? (body.clientWidth < 800 ? "800px" : "auto") : "800px") : "auto" );
}
It would need to be put in a stylesheet of its own and use in conjunction conditional comments or the * html hack which will still work in IE6.

There are also workarounds for min-height as well. You simple give IE6 a set height. Its own bug causes it to expand the element if the content inside of it exceeds the set height.

LukeSkope
07-25-2007, 10:44 PM
thanks!!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum