Forum Moderators: not2easy

Message Too Old, No Replies

Stretchy 3-col page needs min width!

Can't get min-width to work...

         

timware

5:36 am on Nov 22, 2004 (gmt 0)

10+ Year Member



I'm creating 3-colimn and some 2-column pages for a client.

<No URLs, thanks. See TOS [WebmasterWorld.com] and CSS Forum Charter [WebmasterWorld.com]>

The wrapper is set to 90% width.

I need the left and right columns to be a set width (175px), and the middle column (maincontent) to expand as needed. However, I don't want the wrapper to be any less that 760px. I just can't seem to get this working right in any browser, and I'm probably making some boneheaded error but I can't figure it out.

Also, I want all 3 columns to extend the entire height of the wrapper. This is working in IE6/Win but not with Safari. With FireFox (OS X) they extend the entire height, but the wrapper itself doesn't extend the full height. You'll see I set html and body to height=100%, so I'm at a loss.

Jeez, any help will be greatly appreciated. Thanks!

Tim

[edited by: SuzyUK at 8:29 am (utc) on Nov. 22, 2004]

BonRouge

12:58 pm on Nov 22, 2004 (gmt 0)

10+ Year Member



'min-width' doesn't work in IE.
I think this script might fix it for you (if that's what your problem is) :

<script type="text/javascript">
function minWidth(div)
{
var w=document.getElementById(div).offsetWidth;
mw=(w<=760)? 760 : w;
document.getElementById(div).style.width = mw;
}
</script>

<body onload="minWidth('yourdivnamehere')" onresize="minWidth('yourdivnamehere')">

I hope this helps a little.