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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

specify width for different resolutions

Status
Not open for further replies.

y2k1981

Programmer
Aug 2, 2002
773
IE
Hi All,

Is it possible to use css to specify the width of a table to be 680px if the user reso is 800*600, but to be 100% if it's greater than 800*600 without using javascript?

This is a one file written in HTML (which contains all it's css internally) that I'll be e-mailing to somebody, I know that I could use document.write after detecting the users resolution, but they could disable javascript and I don't want to force them to enable it, seing that they don't need to. so I wondered if I could somehow do it without javascript? Is it mission impossible ???

Thanks
Martin
 
AAAAAAAh! I know there should be an incredibly simple solution to this, but it's totally not coming to me....I think that if this "incredibly simple solution" isn't so simple, you're stuck :p. I haven't heard of any fool-proof ways to do that without javascript.

Rick

-----------------------------------------------------------
RISTMO Designs
Arab Church
Reference Guides
 
Don't really understand why you'd want to do this. If what you really want is to force the table to be no less than 680px wide, use a spacer gif:
[tt]
<table width=&quot;100%&quot;>
<tr><td><img src=&quot;/images/spacer.gif&quot; height=&quot;1&quot; width=&quot;680&quot; /></td></tr>
... Rest of table in here ...
</table>
[/tt]
Either design your site for a fixed width, or (preferably) don't. Trying to do both at once is just making unnecessary work for yourself.

-- Chris Hunt
Extra Connections Ltd

The real world's OK for a visit, but you wouldn't want to LIVE there!
 
I think that this was for an email, if I understood correctly. And yes, that was the fix that I was thinking of. Make the width 100% and stick a spacer image in there to maintain a minimum width.

Rick

-----------------------------------------------------------
RISTMO Designs
Arab Church
Reference Guides
 
y2k1981, if this is for an HTML e-mail, may my tiny voice beg you to consider simply uploading an HTML page to a website and then e-mailing a small bit of text including a link? It saves on bandwidth, plus allows you to use your web stats to show who visits you and how effective your e-mail actually is.

I may be unusual in that I have my e-mail set to only send text and when I see something coming in that's HTML, if I don't immediately recognize it as from-well-known-friend, then I delete it, usually before it has a chance to download all that content that I'm sure someone thought was wonderful.

small-voiced,


[monkey] Edward [monkey]

&quot;Cut a hole in the door. Hang a flap. Criminy, why didn't I think of this earlier?!&quot; -- inventor of the cat door
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top