setting a minimal width to a cell...

ktown's picture

They have: 34 posts

Joined: May 2001

Hey all.

I have a table that is set to 100% width

and i have a middle content cell.. width=100%

then on the right of my complete screen i have a vertical 110px wide table full of ads... This table is nested "inside" this main 100% cell and is aligned to the right.

My content cell has a 412px wide title gif

when i resize my window (the browser) eventually the table on the right hits the title (you would think that this would make the stretching stop - of the 100% cell) but it doesn't so then ofcourse the title gif is now over the table on the right hand side...

anyways... making the long story short... can i specify a minimum td width? how?

thx

detox's picture

They have: 571 posts

Joined: Feb 2001

you can set td widths to whatever size you want (theoretically anyway!)

To make sure of constraining the width of your cell, specify the width and add this to the table properties:
style="table-layout:fixed"

this is ie safe I think, but I don;t know about crossbrowser. I will check that out......

ktown's picture

They have: 34 posts

Joined: May 2001

Hey Detox,

Thanks for the quick reply. I'm not sure that we are talking about the same thing though.

If you try and make the size of your browser window smaller you will see that the 'about' title gif begins to overlap the little table on the right... and i want for it to 'stop' when the table hits the gif

work in progres.. Smiling

Thanks again.

ktown's picture

They have: 34 posts

Joined: May 2001

Woo Hoo!!!

I fixed it Smiling
I'm not sure exactly how, but i just rebuild the html from scratch cutting and pasting... so i guess i just had a slop somewhere the first time.

thx

They have: 601 posts

Joined: Nov 2001

If I was you I wouldn't define percentage of screen widths. I would define them in actual pixels or whatever your measurement units are, that way you can make sure that your page will display exactly the same on a 27" monitor as it would on a 14" monitor.

- wil

ktown's picture

They have: 34 posts

Joined: May 2001

but then the page won't stretch right?

They have: 601 posts

Joined: Nov 2001

No. BUT...

The trick I use is to stretch the underlying layer, and then use a fixed-width on the top layer.

I'm actually trying this out on a new site, check out:

http://beta.geo-drws.co.uk

To see what I mean. The background color stretches all across the page, but the actual data stays to a set width.

- wil

ktown's picture

They have: 34 posts

Joined: May 2001

cool bud

Nice design by the way... Yeah after Nuttscrape decided to mess up all alignment I've gone with the fixed width routine Smiling

Instead of layers i think you could also use a "huge" background in your pages... i'm not sure what versions of browsers support layers...

a few of our users are international so i have to stay away from that, bandwith & support wise

oh well...

full screen is nice, but can be a real pain in the butt when you have something on the far right of your main cell :/... anyways... thanks a lot

good luck Smiling

Megan's picture

She has: 11,421 posts

Joined: Jun 1999

It still seems to be overlapping here in Opera 6. I think that you could fix this by just making it all one table instead of nesting the ad table inside the larger table. That should work I think.

ktown's picture

They have: 34 posts

Joined: May 2001

Hey Megan!

Yeah i don't have time to fight with that one anymore... fixed width it is!

They have: 601 posts

Joined: Nov 2001

Sorry for the confusion. I use the term "layers" loosely. I am merely layering tables on top of each other (which is supported since Netscape 2 Smiling

I wouldn't use any DHTML for this site as a large percentage of my target audience would not be able to use it.

Rgds

- wil

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.