Can you specify somehow a maximum width?

T

timemachine

Let's say, I have a box...

#wrap {width:860px; text-align:center; margin:0 auto;}

Can I set it up that way, that a minimum is not important, but maximum
would not exceed 860 px?

So the page will fit any small montor but on huge ones will not go wider
than specified width?

TIA
 
A

asdf

timemachine said:
Let's say, I have a box...

#wrap {width:860px; text-align:center; margin:0 auto;}

Can I set it up that way, that a minimum is not important, but maximum
would not exceed 860 px?

So the page will fit any small montor but on huge ones will not go wider
than specified width?

TIA

For browsers that correctly implement CSS (at the 2.1 level at least), this
might work:

#wrap {max-width: 860px; text-align:center; margin:0 auto;}
 
D

dorayme

timemachine said:
Let's say, I have a box...

#wrap {width:860px; text-align:center; margin:0 auto;}

Can I set it up that way, that a minimum is not important, but maximum
would not exceed 860 px?

So the page will fit any small montor but on huge ones will not go wider
than specified width?

width, min-width, and max-width are three different properties. Take a
look at:

<http://htmldog.com/reference/cssproperties/>

Sounds like max-width is what you might want; width alone will cause
scrollbars to come up for those with smaller than 860px wide browsers,
(often not a good idea!); min-width is quite what you don't sound like
you need!
 
A

asdf

dorayme said:
width, min-width, and max-width are three different properties. Take a
look at:

<http://htmldog.com/reference/cssproperties/>

Sounds like max-width is what you might want; width alone will cause
scrollbars to come up for those with smaller than 860px wide browsers,
(often not a good idea!); min-width is quite what you don't sound like
you need!

OMG!!!! We agree!!!!

(even if it is in tortured English with terrible punctuation)

ROFL
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top