Can you specify somehow a maximum width?

Discussion in 'HTML' started by timemachine, Sep 16, 2009.

  1. timemachine

    timemachine Guest

    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
    timemachine, Sep 16, 2009
    #1
    1. Advertising

  2. timemachine

    asdf Guest

    "timemachine" <> wrote in message
    news:4ab05cc1$0$27602$...
    > 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;}
    asdf, Sep 16, 2009
    #2
    1. Advertising

  3. timemachine

    dorayme Guest

    In article
    <4ab05cc1$0$27602$>,
    timemachine <> wrote:

    > 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!

    --
    dorayme
    dorayme, Sep 16, 2009
    #3
  4. timemachine

    asdf Guest

    "dorayme" <> wrote in message
    news:...
    > In article
    > <4ab05cc1$0$27602$>,
    > timemachine <> wrote:
    >
    >> 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!
    >
    > --
    > dorayme


    OMG!!!! We agree!!!!

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

    ROFL
    asdf, Sep 16, 2009
    #4
  5. timemachine

    timemachine Guest

    asdf wrote:
    > "dorayme" <> wrote in message
    > news:...
    >> In article
    >> <4ab05cc1$0$27602$>,
    >> timemachine <> wrote:
    >>
    >>> 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!
    >>
    >> --
    >> dorayme

    >
    > OMG!!!! We agree!!!!
    >
    > (even if it is in tortured English with terrible punctuation)
    >
    > ROFL
    >
    >



    Many thanks!!!

    That's what I needed!

    Cheers...
    timemachine, Sep 17, 2009
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. AndrewF
    Replies:
    1
    Views:
    744
    Bruce Barker
    Oct 10, 2005
  2. =?Utf-8?B?RFdZ?=
    Replies:
    1
    Views:
    348
    =?Utf-8?B?SmltIEhlYXZleQ==?=
    Feb 1, 2006
  3. Ike

    extend String (somehow!)

    Ike, Sep 14, 2004, in forum: Java
    Replies:
    12
    Views:
    3,991
  4. Can Burak Cilingir

    disabling the line buffer somehow

    Can Burak Cilingir, Mar 5, 2006, in forum: Python
    Replies:
    0
    Views:
    259
    Can Burak Cilingir
    Mar 5, 2006
  5. phanhuyich
    Replies:
    4
    Views:
    257
Loading...

Share This Page