Jump to content


Photo

scrollable table does not behave properly in IE


  • Please log in to reply
1 reply to this topic

#1 appeland

appeland
  • Members
  • PipPipPip
  • Advanced Member
  • 30 posts

Posted 07 October 2006 - 04:25 PM

Hello,
I have surrounded a table with the following div:
<div style=" width:100%; height:500px; overflow:auto;">

Internet Explorer takes the width of the stuff inside the divs as 100% while
Firefox uses the 100% of the table that surrounds everything (tamplate table).

That results in the (mambo) template being messed up in IE  :(
Any idea how to fix this please ?
Thanks & regards,
Andi


#2 dbrimlow

dbrimlow
  • Members
  • PipPipPip
  • Advanced Member
  • 712 posts

Posted 08 October 2006 - 12:41 AM

overflow in general is apples and oranges for IE and proper browsers.

overflow:auto is a nightmare in IE.

Many coders use overflow:hidden and overflow:visible as actual IE hacks to get IE 5.0.x and 5.5 to tame the IE "double margin bug" and the "expanding box bug".

What you most likely are looking for is the "overflow:auto" element along with the "visibility" feature of an absolute div (aka "layer" in DreamWeaver). On its own it has no reference points other than what you want the browser default to guess at (and you never want to leave it up to IE to guess). BUT, used in an absolute positioned div it tells the browser how to guess.

Example - what I did here was to put a table based form within an absolute positioned div, http://www.manhattan...forms/r_lwu.php :

Here is the css I used. The div should be wider than the table, but the table must be longer than the div. Then designate how much of the div you want to be visible with height and when you specify overflow:auto it adds scrolling up and down for visibile table height (you can do the same with width by making the table width wider than the div width.

#form {
position: absolute;
        top: 108px;
width:515px;
height:450px;
margin-left: 215px;
overflow: auto;
visibility: visible;
border-color:#ccc;
border-style:solid;
border-width:thin;
left: 0px;
top: 110px;

}
Dave

I am always amazed by no matter how much I know, I know I don't know as much as I thought I knew.  - D. Brimlow.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users