View Full Version : Problems width min height for a div In NS, Moz...
I have an absolute positioned div which a have specified a height for. The div contains text, but if the text takes up more space than the height I specified, the text continue, but the div doesn't widen out in Netscape 6, Mozilla and Opera. Works in Internet Explorer though. I suspect that Internet Explorer is the on that handles it wrong.
But how do I get rid of this, when I want to have a minimum width for the div.
You can see the problem here:
http://hzr.dzygn.com/usersettings.html
If you want to take a look in the CSS file, it's located here:
http://hzr.dzygn.com/layout.css
Thanks in advance!
<font face='Courier New'><font color=red>
david håsäther
[url:sbpiaf3bh4]hzr@dzygn.com[/url:sbpiaf3bh4]|[url="http://hzr.dzygn.com/"]hzr.dzygn.com[/url:sbpiaf3bh4](beta)
</font id=red></font id='Courier New'>
Edited by - hzr on 24 June 2002 15:28:13
ummm, I'm not seeing which div it is that is absolutely positioned, but I'm assuming you're talking about your "main" class...
<pre id=code><font face=courier size=2 id=code>.main {
width: 640px;
height: 530px;
color: black;
margin-top: -2px;
background: white url(bg.jpg) no-repeat bottom left;
border: 1px solid black;
padding: 2px;
font: 11px verdana, arial, sans-serif;
text-align: left;
}</font id=code></pre id=code>
add this to the definition :
<pre id=code><font face=courier size=2 id=code>overflow : auto ;</font id=code></pre id=code>
and you should be good to go.
if you put the div in a container which has the background set, and then the text div w/ height:auto; the container should get the same height as the content and if the height of the content is less than 400px it's still 400px heigh.
<font color=orange>» mark</font id=orange>
<font color=brown>» you can [url="dc@whatismyname.cjb.net"]say[/url:qrpd0cuvfu] what you will but it always will be [url="http://whatismyname.cjb.net/"]speculated[/url:qrpd0cuvfu]</font id=brown> » bomfunk mc's
Aha, the div was absolutely positioned before, but I've removed it now w/out remembering it, hehe.
And thanks, I will try your tips
<font face='Courier New'><font color=red>
david håsäther
[url:f966qgkts2]hzr@dzygn.com[/url:f966qgkts2]|[url="http://hzr.dzygn.com/"]hzr.dzygn.com[/url:f966qgkts2](beta)
</font id=red></font id='Courier New'>
Tom, I tried your tip, but if I use overflow: [whatever]; in the 'main' div the menu f***s up.
I will try Neos tip and try a little on my own, thanks anyway!
<font face='Courier New'><font color=red>
david håsäther
[url:x9wiv4kjum]hzr@dzygn.com[/url:x9wiv4kjum]|[url="http://hzr.dzygn.com/"]hzr.dzygn.com[/url:x9wiv4kjum](beta)
</font id=red></font id='Courier New'>
gotta love the incompatibilites with the browsers....joy.
At least it's a major improvement over the differences between NN4 and IE4....
<img src=icon_smile_wink.gif border=0 align=middle>
vBulletin® v3.6.7, Copyright ©2000-2008, Jelsoft Enterprises Ltd.