Welcome to WebmasterWorld Guest from 50.17.114.227

Forum Moderators: not2easy

Message Too Old, No Replies

Scaling Limits accross x-axis

Scaling Limits accross x-axis

     
3:58 pm on Sep 25, 2007 (gmt 0)

New User

5+ Year Member

joined:Aug 28, 2007
posts:9
votes: 0


Hi everybody,
I've got a little question about something I've been toying / battling with for sometime now.

It's pretty straightforward: "Is there a way to limit the scaling factor across the x-axis? ie. If I want a page to scale from 1024 to 1200, is there a way to limit the scaling?"

1. If I set the table to scale at say 95%, at 1024 I'm displaying ~ 972, and at 1280 I'm displaying ~ 1216, this is okay, but not ideal. Is there another way to insure a small space around the sides?

[edited by: windwalker at 4:11 pm (utc) on Sep. 25, 2007]

4:06 pm on Sept 25, 2007 (gmt 0)

Senior Member

WebmasterWorld Senior Member whoisgregg is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Dec 9, 2003
posts:3416
votes: 0


Welcome to WebmasterWorld [webmasterworld.com], windwalker!

You can use the CSS declaration max-width, but I don't believe it's fully supported across all browsers. You can always use javascript to "watch" the window width and dynamically rewrite the styles of the elements, but users without javascript would need an alternate solution.

Btw, signatures and URLs (linked or not) aren't allowed at WebmasterWorld. :)

4:11 pm on Sept 25, 2007 (gmt 0)

New User

5+ Year Member

joined:Aug 28, 2007
posts:9
votes: 0


Thanks Gregg,
Maybee I'm stuck with percentages if max-width isn't cross compliant...

Thanks for the heads up about signatures, I was trying to be polite by putting one! Opps!

4:49 pm on Sept 25, 2007 (gmt 0)

Senior Member

WebmasterWorld Senior Member whoisgregg is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Dec 9, 2003
posts:3416
votes: 0


I did a little bit of research... it looks like max-width is supported in IE7, just not in IE6. :D
7:13 pm on Sept 25, 2007 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:June 26, 2004
posts:1497
votes: 0


Yep, for everything except tables.
7:59 pm on Sept 25, 2007 (gmt 0)

Senior Member

WebmasterWorld Senior Member whoisgregg is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Dec 9, 2003
posts:3416
votes: 0


Thanks Robin. :)
10:20 pm on Sept 25, 2007 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member 10+ Year Member

joined:Sept 4, 2001
posts: 2143
votes: 7


windwalker,

You could set the width of the parent element that contains your content, e.g. a <div> wrapper around everything, to 100% then set a margin. Browsers have a default margin, but it is not uniform, so you could do the following:

body {margin:0; padding:0;}
#wrap {width: 100%; /* though I suggest 99% */ margin: 5px;}

<div id="wrap">
ALL YOU CONTENT
</div>

I strongly suggest you do not use:
* html body {margin:0; padding: 0;}
as you will have to set the margins and padding for [u]every[/u] element.

Marshall