• 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.

Web programming: getting HTML/XML content to fit a % of the screen?

TJN23

Golden Member
I basically want all my users to be able to view an HTML file the same way, regardless of which resolution they are using. I'd like the viewability to look the same on a laptop as it does on a 21 inch screen.

The HTML file is generated by Excel - it takes the XLS file and outputs it to an HTML file with some XML inside.

Is this possible?
 
You could put everything in a fixed width iframe. Your 21-inch-screen users might rebel, though 🙂
 
Put everything in tables and set the cell widths to %'s like:

<table align="center" border="0" cellPadding="0" cellSpacing="0" width="100%">
<tr>
<td valign="top" width="30%">
<div align="left">Left column stuff goes here</div>
</td>
<td valign="top" width="40%">
<div align="center">Center column stuff goes here</div>
</td>
<td valign="top" width="30%">
<div align="left">Right column stuff goes here</div>
</td>
</tr>
</table>
 
Originally posted by: Traire
Put everything in tables and set the cell widths to %'s like:

<table align="center" border="0" cellPadding="0" cellSpacing="0" width="100%">
<tr>
<td valign="top" width="30%">
<div align="left">Left column stuff goes here</div>
</td>
<td valign="top" width="40%">
<div align="center">Center column stuff goes here</div>
</td>
<td valign="top" width="30%">
<div align="left">Right column stuff goes here</div>
</td>
</tr>
</table>

my choice also..

 
Study CSS, use div's or apply styles to other block elements. Learn it, love it, live it.

Tables are not ment for layout. Unless of course you need to display tablular data.
 
Originally posted by: sourceninja
Study CSS, use div's or apply styles to other block elements. Learn it, love it, live it.

Tables are not ment for layout. Unless of course you need to display tablular data.

I'm recoding a site from HTML to PHP/MySQL and I'm moving the site layout away from tables. In fact, I have pretty much done this and it looks great! However, I wish to have a "members" page and I'm trying to display this without using tables but I think tables it the best way to go. So the question is.... Are tables still acceptable as long as they are not used for formatting but rather displaying data?
 
Originally posted by: BigPete
Originally posted by: sourceninja
Study CSS, use div's or apply styles to other block elements. Learn it, love it, live it.

Tables are not ment for layout. Unless of course you need to display tablular data.

I'm recoding a site from HTML to PHP/MySQL and I'm moving the site layout away from tables. In fact, I have pretty much done this and it looks great! However, I wish to have a "members" page and I'm trying to display this without using tables but I think tables it the best way to go. So the question is.... Are tables still acceptable as long as they are not used for formatting but rather displaying data?
Sure, that's what tables are for 🙂

Generally, I try to think of a blind person getting the page read to them by a reader. If it says "This is a table with X data" (where X is the caption) and it makes sense then that's when tables are cool. Ok, I know that sounds a bit silly, but that's how I reason it... Tables aren't evil, just misused.
 
Back
Top