forcing maximum width

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • abracad

    forcing maximum width

    Is there a way to force a maximum width for an image, table or table cell?

    cheers
  • Brian

    #2
    Re: forcing maximum width

    abracad wrote:[color=blue]
    > Is there a way to force[/color]

    An answer to the common newbie questions on whether a Web author can 'force' a browser to do things.

    [color=blue]
    > a maximum width for an image, table or table cell?[/color]

    I'd suggest using css max-width property to suggest a maximum width.

    table {
    max-width: 30em;
    }

    (btw, f'ups set to ciwas; your message doesn't need to be x-posted)

    --
    Brian
    follow the directions in my address to email me

    Comment

    • Andrew Thompson

      #3
      Re: forcing maximum width

      "abracad" <abracad_1999@y ahoo.com> wrote in message
      news:e14ddf84.0 401011417.48480 13@posting.goog le.com...[color=blue]
      > Is there a way to force a maximum width for an image, table or table cell?[/color]

      You can overide getPreferredSiz e() to
      getMaximumSize( ) AFAIU, but it sounds
      like a silly thing to do.

      Perhaps if you describe the overrall effect
      you want from your GUI, we can advise
      the best way to achieve it.

      --
      Andrew Thompson
      * http://www.PhySci.org/ PhySci software suite
      * http://www.1point1C.org/ 1.1C - Superluminal!
      * http://www.AThompson.info/andrew/ personal site


      Comment

      • Andrew Thompson

        #4
        Re: forcing maximum width

        "Andrew Thompson" <andrew64@bigNO SPAMpond.com> wrote in message
        news:3x8Jb.7381 0$aT.72194@news-server.bigpond. net.au...[color=blue]
        > "abracad" <abracad_1999@y ahoo.com> wrote in message
        > news:e14ddf84.0 401011417.48480 13@posting.goog le.com...[color=green]
        > > Is there a way to force a maximum width for an image, table or table[/color][/color]
        cell?

        D'Oh! Sorry, thought I was in a Java group
        when I wrote my reply, my answer is not in
        any way relevant to web page formatting.


        Comment

        • Lauri Raittila

          #5
          Re: forcing maximum width

          In article abracad wrote:[color=blue]
          > Is there a way to force a maximum width for an image, table or table cell?[/color]

          No. What you can try is max-width with !important (and width). !important
          nor width shouldn't be used carelesly, as people that do override width
          and max-width are doing it on good reasons. (and there is not that many
          people doing that anyway, even if I am)

          The bigger problem is that IE don't understand max-width.



          --
          Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
          Saapi lähettää meiliä, jos aihe ei liity ryhmään, tai on yksityinen
          tjsp., mutta älä lähetä samaa viestiä meilitse ja ryhmään.

          Comment

          Working...