Table sizing

  • Thread starter Thread starter tshad
  • Start date Start date
T

tshad

I have a table in my panel that is sized to the size of the window with 3
columns (40%, 30% and 30%).

As the window is resized the columns resized, which is what I want.

But I want to have a minimum size the Table can be shrunk to as all the
controls get out of what if I get less that about 800px.

Is there there a way to tell the table to resize when the window is greater
than 800px and stop when the window gets less than 800px? I realize that
the table will then run off the end of the window and would have to scroll
left and right but that is fine.

At the moment the table is essentially set up as:

<asp:Panel ID="mFilterPanel" runat="server">
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td class="ColumnWidth40" >
</td>
<td class="ColumnWidth30">
</td>
<td class="ColumnWidth30">
</td>
</tr>
</table>
</asp:Panel>

Thanks,

Tom
 
Hello,

You can achieve this with a alpha transparent 1 pixel GIF or PNG image
(the "<br />" at the end may or may not be needed).

<asp:Panel ID="mFilterPanel" runat="server">

<img src="~/images/dot.gif" style="width: 800px; height: 1px;"
runat="server" /><br />

<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td class="ColumnWidth40" >
</td>
<td class="ColumnWidth30">
</td>
<td class="ColumnWidth30">
</td>
</tr>
</table>
</asp:Panel>

Rasika
00157675214011
 
Rasika said:
Hello,

You can achieve this with a alpha transparent 1 pixel GIF or PNG image
(the "<br />" at the end may or may not be needed).
What is that and how do you make that? Can you do it with Paint Shop Pro?

How does an image before and outside of the table cause this effect?

Thanks,

tom
 
I tried it out and it worked really well.

I couldn't find out how to do it with a Gif as the alpha transparency was
not an option in Paint Shop Pro 9.0, but it did have it in PNG.

Just not sure why having the transparent Gif at 800px affected the table
below it.

Thanks,

Tom
 
Mark Rae said:
Because an image, unlike text, can't wrap and a table can't shrink smaller
than its graphic content...

And so the graphic keeps the Panel 800px wide with the Table filling 100% of
the panel?

That was what was confusing.

Thanks,

Tom
 
Mark Rae said:
Not quite - it means that the panel (and, therefore, the table inside it)
can grow wider than 800px, but can't shrink narrower than 800px...
That was what I meant.

But why does it have to be alpha transparent Gif or PNG?

Thanks,

Tom
 
it is better to have it transparent because ...lets say you make it white

and tomorrow you change your website to have a black background.
You will see it.

Making the "White" transparent means no matter what you do, it will never
show on the users screen.

Miro

tshad said:
Mark Rae said:
Not quite - it means that the panel (and, therefore, the table inside it)
can grow wider than 800px, but can't shrink narrower than 800px...
That was what I meant.

But why does it have to be alpha transparent Gif or PNG?

Thanks,

Tom
 
Miro said:
it is better to have it transparent because ...lets say you make it white

and tomorrow you change your website to have a black background.
You will see it.

Making the "White" transparent means no matter what you do, it will never
show on the users screen.
But what is the difference between Transparent and Alpha Transparent?

Thanks,

Tom
 
Hmm wheres that usenet post I was composing. Posted by accident? My
apologies.

The html table has a min-width property which can be set to 800px.
<table style="min-width:800px;" >

regards
A.G.
 
Back
Top