By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,767 Members | 1,255 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,767 IT Pros & Developers. It's quick & easy.

forcing maximum width

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

cheers
Jul 20 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
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

P: n/a
"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

P: n/a
"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

P: n/a
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.