The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> fixed width(in %) table and scrollbar issue, fixed width(in %) table and scrollbar issue
poojak
post Aug 4 2008, 04:08 AM
Post #1


Newbie
*

Group: Members
Posts: 15
Joined: 4-August 08
Member No.: 6,331



Hi All,
I am using a two column table in a html page. I am using width=100%. in the same table one colum is 46% wide and the other one is 54% wide. In one column i have another table which is quite wide and I need a horizontal scrollbar to show the complete table. The problem is if I give all widths in % than in IE it doesn't display right. can anyone help??? I m using a DIV overflow:auto for horizontal scrollbar and if i use width:100% for the same DIV than the it stretches main td to and scroll bar doesn't show up. but this code works fine in Firefox and Safari.
Thanks in advance
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Aug 4 2008, 05:10 AM
Post #2


.
********

Group: WDG Moderators
Posts: 9,659
Joined: 10-August 06
Member No.: 7



QUOTE(poojak @ Aug 4 2008, 11:08 AM) *

I m using a DIV overflow:auto for horizontal scrollbar and if i use width:100% for the same DIV than the it stretches main td to and scroll bar doesn't show up. but this code works fine in Firefox and Safari.

This happened to me in all but Opera. If you give the outer table CSS "table-lauout: fixed" "table-layout: fixed" it seems to behave.

This post has been edited by Christian J: Aug 4 2008, 08:42 AM
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
poojak
post Aug 4 2008, 06:36 AM
Post #3


Newbie
*

Group: Members
Posts: 15
Joined: 4-August 08
Member No.: 6,331



Thanks Christian for aquick reply. I tried this but doesn't work
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Aug 4 2008, 08:41 AM
Post #4


.
********

Group: WDG Moderators
Posts: 9,659
Joined: 10-August 06
Member No.: 7



Works for me in IE7. Could you link to a test page?

Also note the typo in my previous post, it should be "table-layout: fixed".
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
poojak
post Aug 5 2008, 10:18 PM
Post #5


Newbie
*

Group: Members
Posts: 15
Joined: 4-August 08
Member No.: 6,331



No guys I can't upload the page and table-layout:fixed is not working.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Aug 6 2008, 04:04 AM
Post #6


.
********

Group: WDG Moderators
Posts: 9,659
Joined: 10-August 06
Member No.: 7



Hard to give any advice then. mellow.gif This works for me though:

CODE
<table style="width: 100%; table-layout: fixed;">
<tr>
<td style="width: 25%; border: solid red;">
    <div style="width: auto; border: solid blue; overflow: auto;">
    <table style="width: 2000px;">
    <tr>
    <td>...</td>
    </tr>
    </table>
    </div>
</td>
<td style="width: 75%; border: solid red;">...</td>
</tr>
</table>

(you also need a Doctype that puts IE in standards mode).
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 26th April 2024 - 05:45 PM