Question:
Can I force a maximum width in a n HTML table column?
Erika S
2006-12-05 05:22:31 UTC
I have designed a website using tables as the only method I could figure out to properly lay out a graphic which wraps along the top of the page and then down the right side. The graphics and all page content are contained within the table measuring 600 pixels across centered on the page.

When using small or medium--or even large--fonts, it appears perfectly. However, if the viewer has their font set to extra large (and apparently a large number of my viewers do!), the graphic breaks up and part of it pushes off to the right, increasing the width of the table. It does this because the text in the left column is too large.

I tried setting the width in each table cell, but it doesn't control the problem. I am viewing it in Firefox 1.5.08. The problem does not occur, on my screen, in IE, but it does occur on other peoples' screens in the AOL browser and probably in IE as well if they have a low resolution.

Any ideas?
Four answers:
truthyness
2006-12-06 00:41:16 UTC
Seems like CSS may fix this problem so that you could assign a fixed type size over all platforms/browsers.
Jeff W
2006-12-05 11:21:38 UTC
I have come across this problem before with longer words and I don't think there is an easy solution (or one at all) at this point. There is no standard that you can use via CSS as it varies across languages and there is no universal dictionary for breaking up words:

http://www.w3.org/International/O-HTML-hyphenation.html



One thing you could try is to have your header graphic stay the same, set your right hand graphic as a background image and set the text to float over the right hand image. In this case, the text will get larger from left to right and may overlap the graphic on the right side, but at least it won't break your layout.



Let me know if that works.
doughtie
2016-11-30 09:07:38 UTC
in the journey that your accurate column has diverse widths in separate rows so will your left column. one thanks to have variable width columns is to create your table with more advantageous columns then merge columns previously entering into textual content. Merge cells utilising of route replace 2 with even with style you want. BTW rowspan ought to correctly be used to merge a column for the period of distinct rows. Fred
ninesunz
2006-12-05 05:27:59 UTC
umm try allowing text wrapping. This will froce the text to indent down and won't expand the table.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...