469,270 Members | 1,152 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,270 developers. It's quick & easy.

forcing maximum width

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

cheers
Jul 20 '05 #1
4 10242
abracad wrote:
Is there a way to force
http://webtips.dan.info/force.html
a maximum width for an image, table or table cell?


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

Jul 20 '05 #2
"abracad" <ab**********@yahoo.com> wrote in message
news:e1*************************@posting.google.co m...
Is there a way to force a maximum width for an image, table or table cell?


You can overide getPreferredSize() 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
Jul 20 '05 #3
"Andrew Thompson" <an******@bigNOSPAMpond.com> wrote in message
news:3x******************@news-server.bigpond.net.au...
"abracad" <ab**********@yahoo.com> wrote in message
news:e1*************************@posting.google.co m...
Is there a way to force a maximum width for an image, table or table

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.
Jul 20 '05 #4
In article abracad wrote:
Is there a way to force a maximum width for an image, table or table cell?


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.

Jul 20 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by abracad | last post: by
reply views Thread by Robert Wille | last post: by
1 post views Thread by Robert Wille | last post: by
4 posts views Thread by p.numminen | last post: by
3 posts views Thread by =?iso-8859-1?q?Jean-S=E9bastien?= | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.