• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Need some HTML help. Table Widths.

fuzzybabybunny

Moderator<br>Digital & Video Cameras
Moderator
I just got done coding about 15-some pages with tables all set at 810px wide.

Now I realize that having an absolute width probably was not a good idea. Is there any way to have an absolute width that can start resizing itself as the browser window grows smaller?

ex.

browser window: 1600px
table: stays at 810px

browser window: 1000px
table: stays at 810px

browser window: 900px
table: stays at 810px

browser window: 800px
table: resizes to 800px

browser window: 500px
table: resizes to 500px
 
While it would be nice if you could specify min/max/desired width for HTML tables (and/or columns), you can't. Part of this is deliberate, as HTML is not really a document formatting language. It's designed to give the client (which may include things like non-visual browsers, or devices with small screens) a lot of flexibility in displaying the information.

If you're displaying text and not images -- is there some particular reason you want to keep the table at 810 pixels maximum width?

Without resorting to scripting -- there are some semi-hacky things you can do with embedded images to enforce minimum widths, but I'm not sure there's anything you can do with maximum widths. I'm not an HTML expert, though.
 
There's min/max width/height properties in CSS. It works on all browsers except for IE, which actually treat height/width as the min height/width.
 
Tabular data isn't really one that should be fluid. If you have a significant amount of content per cell to stick into a table, you probably shouldn't be using a table.
 
Back
Top