...

View Full Version : Horizontal Div Problem



phil.wood
11-18-2008, 08:39 PM
I am looking for a bit of help to resolve a minor problem with rendering in ie6.

I have attached the html and css files for viewing.
This displays fine in FF3 or IE7 but I need it to do the same in IE6.
The RH side of the table needs to scroll horizontally, while the LH side (first 2 cols) need to remain as they are.

I can hack it correctly using javascript, but is there any way to get IE6 to behave the same as FF3 or IE7 using CSS?

Lochlan
11-19-2008, 01:15 AM
How bout trying this...



#wrapper {
width:100%;
background-color:#00FF99;
position:relative;
}

#leftdiv {
background-color:#993300;
position:absolute;
left:0;
}

#rightdiv {
background-color:#CCCC33;
overflow:scroll;
border-right-style: dashed;
border-right-width: 1px;
border-right-color: #C0C0C0;
width:900px;
position:absolute;
left:233px;
}

I've just positioned each one absolutely, relative to the wrapper. Just increase the rightdiv's width to whatever you'd like.

phil.wood
11-19-2008, 07:31 AM
Thanks!

That seems to work a treat - your help is much appreciated.

phil.wood
11-19-2008, 02:24 PM
Thanks again.. I have one more question:

This works fine as long as I make at least the left hand div a fixed width.
Is there any way to make it work if the widths for both divs are dynamic?

i.e. The width of the left div is set by the width of the table in it, then the right div fills the rest of the browser window with scroll bars on the div to view the code that extends beyond the browser window (pretty much as this does, except the 2 divs dynamically size to fill the browser).



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum