Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

table issues 2

Status
Not open for further replies.

iisman

Technical User
Mar 6, 2005
85
CA
I have a 3x3 table, where the middlle column is meant to be dynamic, and resize depending on the content. It is a db admin, so depending on the # of db fields, the center col could be quite wide.

the problem - after a certain width, the two outer cols virtually disappear. is there a way to hold them at 30 px, no matter what width the mid col is?

i use css right now to hold the with of cols 1 and 3 at 30px, and I have not specified a width for the mid col.

Any suggestions?
 
If you have specified width of the two fixed columns 30px, the browsers should respect that and do not attempt to shrink beyond that point. You might try adding table-layout: fixed; to your table declarations if it would help. If not, you could always revert to the outdated transparent gif in the column that shouldn't shrink.
 
To add to Vragabond's suggestions... maybe include width:auto on the middle column of cells. That's what it should be using by default... but adding it specifically may make your problem disappear.

Cheers,
Jeff


[tt]Jeff's Page [/tt][tt]@[/tt][tt] Code Couch
[/tt]
 
Thank you both for your tips.

Unfortunately, the only one that worked was using a .gif spacer to force cols 1 and 3 to stay at 30px.

As you noted, vragabond, thats an awful way to have to do things, and I was in fact trying to avoid that.

I will use it for now, since it's just an 'admin' page, for internal use.

If anyone else had any sugg's for this issue, please post, as i'd like to know a way around for future use.

Thanks again.
 
Could we see all the code that you're using? And the platform you're testing it on. I had no trouble keeping table cells from shrinking on my system.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top