473,594 Members | 2,739 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 10509
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**********@y ahoo.com> wrote in message
news:e1******** *************** **@posting.goog le.com...
Is there a way to force a maximum width for an image, table or table cell?


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
Jul 20 '05 #3
"Andrew Thompson" <an******@bigNO SPAMpond.com> wrote in message
news:3x******** **********@news-server.bigpond. net.au...
"abracad" <ab**********@y ahoo.com> wrote in message
news:e1******** *************** **@posting.goog le.com...
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
4756
by: abracad | last post by:
Is there a way to force a maximum width for an image, table or table cell? cheers
0
1593
by: Robert Wille | last post by:
I have a number of very common queries that the optimizer plans a very inefficient plan for. I am using postgres 7.2.3. I vacuum hourly. I'm wonderingwhat I can do to make the queries faster. Here are the relevant tables: create table image( imageid integer not null, /* The image's ID */ containerid integer not null, /* The container that owns it */ name varchar(120) not null, /* Its name */ state bigint not null default 0,...
1
2766
by: Robert Wille | last post by:
I have a number of very common queries that the optimizer plans a very inefficient plan for. I am using postgres 7.2.3. I vacuum hourly. I'm wonderingwhat I can do to make the queries faster. Here are the relevant tables: create table image( imageid integer not null, /* The image's ID */ containerid integer not null, /* The container that owns it */ name varchar(120) not null, /* Its name */ state bigint not null default 0,...
6
16116
by: Henro V | last post by:
And if there is one, is there a way to make forms that are wider? For every day on the form (first field) it needs to be followed by 52(!) datefields. I've widened the form as far as I can but I lack space................ Any solutions? TIA Henro
5
2844
by: shanti.miller | last post by:
I've got a grid that uses paging and displays a maximum of 10 records at a time. Sometimes the fields have a lot of data in them and the datagrid takes up way too much horizontal space. I've tried setting the height and it doesn't do anything. I can set the width to some very large number like 3000px and that works ok, but it's a waste when the data doesn't require that much space. Is there a way to limit the height of the grid or of...
3
8924
by: mrpeter05 | last post by:
I can not find a way to measure the height of a string by setting a maximum width! I need the strings maximum width to be the width of the screen and want to use that to calculate the height. Is this possible?
4
5082
by: p.numminen | last post by:
Is it possible, with CSS, to determine a certain _maximum_ width for a text, paragraph, division, etc.?
2
2327
by: RKSpangler | last post by:
Greetings: Is there any way to determine the maximum width of all data elements in a particular column in a table? Sorting a column won't do it, of course, since it will use a collating sequence based on the content of the data. I want to know, for example, that the maximum width of a (non-blank) populated field in a table is, say, 10 (even though the field itself may be defined as width-255). Many thanks.
3
8845
by: =?iso-8859-1?q?Jean-S=E9bastien?= | last post by:
hello, is it possible to resize an image with same proportion. having a maximum height and a maximum width. the solution should work on main browsers (do not use max-height and max-width). or should i do it with javascript?
0
8246
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
6652
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
5738
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5404
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3854
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
3895
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2383
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1476
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1205
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.