Saturday, March 31, 2012

Table Scrolling Problem

Hi,

I have a table which I need to display within a div of a fixed width. The
length of the table exceeds the width of the div which is ok as I can make
the div scrollable. The problem that I have is that the cells in the table
must be a fixed with because they need to co-incide with another table which
is going to be in another scrolling div below.

The problem is if I restrict the with of the containing div to something
less than the with of the table. The table then attempts to crunch the
table width to the least width and thus reduces the table cell widths and
ignores the fixes widht size applied tot he style.

How can I get around this.the simple solution would be to
1. create transparent.gif with size 1x1 pixel
2. To the headers of columns add <img src="http://pics.10026.com/?src=transparent.gif" width=100
height=1>

This will keep your columns to be at least 100 pixels.

PS: There might be easier solutions with CSS. Mine is just a suggestion and
will work with any browser.

George.

"A Question" <q@.qs.comwrote in message
news:eKEMiamPIHA.1208@.TK2MSFTNGP05.phx.gbl...

Quote:

Originally Posted by

Hi,
>
I have a table which I need to display within a div of a fixed width. The
length of the table exceeds the width of the div which is ok as I can
make the div scrollable. The problem that I have is that the cells in the
table must be a fixed with because they need to co-incide with another
table which is going to be in another scrolling div below.
>
The problem is if I restrict the with of the containing div to something
less than the with of the table. The table then attempts to crunch the
table width to the least width and thus reduces the table cell widths and
ignores the fixes widht size applied tot he style.
>
How can I get around this.
>
>


Hi, yes, its a possibility. I have also found that fixing the width of the
table acheives the same thing. Thanks for your help.

"George Ter-Saakov" <gt-nsp@.cardone.comwrote in message
news:ux8U02mPIHA.292@.TK2MSFTNGP02.phx.gbl...

Quote:

Originally Posted by

the simple solution would be to
1. create transparent.gif with size 1x1 pixel
2. To the headers of columns add <img src="http://pics.10026.com/?src=transparent.gif" width=100
height=1>
>
This will keep your columns to be at least 100 pixels.
>
PS: There might be easier solutions with CSS. Mine is just a suggestion
and will work with any browser.
>
George.
>
>
"A Question" <q@.qs.comwrote in message
news:eKEMiamPIHA.1208@.TK2MSFTNGP05.phx.gbl...

Quote:

Originally Posted by

>Hi,
>>
>I have a table which I need to display within a div of a fixed width. The
>length of the table exceeds the width of the div which is ok as I can
>make the div scrollable. The problem that I have is that the cells in the
>table must be a fixed with because they need to co-incide with another
>table which is going to be in another scrolling div below.
>>
>The problem is if I restrict the with of the containing div to something
>less than the with of the table. The table then attempts to crunch the
>table width to the least width and thus reduces the table cell widths and
>ignores the fixes widht size applied tot he style.
>>
>How can I get around this.
>>
>>


>
>

0 comments:

Post a Comment