Table sizing

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
 
R

Rasika WIJAYARATNE

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
 
T

tshad

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
 
T

tshad

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
 
T

tshad

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
 
T

tshad

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
 
M

Miro

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
 
T

tshad

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
 
R

Registered User

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,073
Latest member
DarinCeden

Latest Threads

Top