Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Re: Setting Width

Thread Tools

Re: Setting Width

Posts: n/a
Tony Cooper wrote:

> The question is how to set the width so that it is viewable on at
> least most monitors. Somewhere, I think I want to set <width = 90%>
> so the two-column image adjusts to the width of the screen it's being
> viewed on.
> If I use an image that is 900 pixels wide, it shows just fine on my
> screen. It might overflow other screens. It seems that if I upload
> an image that is 1000 pixels wide, and set the width of the whole
> table as a percentage of the screen, that it would adjust to any
> screen. (I do understand that I'm loading the full image, but load
> time isn't really a problem with the image of 100 dpi and a fairly
> small overall table.)

OK, I think I got it: you have noticed that some recent browsers do
scale pictures at the time of rendering. Be careful, this is a feature
of _some_ browsers, not a general behaviour of all. You should not take
it for granted.

A picture is not defined by "100 dpi". This sort of definition is useful
only when you want to print it. A picture in HTML is defined by its size
(width in pixels by height in pixels) and by its "weight" (in kB =

I would recommend you should use pictures no larger than about 720 px in
width and 540 px in height, so that they will fit nicely in screens or
windows of 800 x 600 and 1024 x 768. Additionally, the pict "weight"
(file size) should preferably not be much more than 50 kB for a quick
download, acceptable even on a dial-up.
> If I'm on the right track, where do I put the <width =95%> constraint
> on the width of the whole table?

Now you see that this "width=whatever" is useless. Let the user decide
what window size he has and how he wants to see your beautiful image.
I do use the attribute 'Width="100%"' in several of my pages, but this
is only to center the image on the screen. The complete tag is:
<TABLE WIDTH="100%" ALIGN="center" BORDER="0"> plus padding and spacing
if required.

If you want to center your table, give it a width of 100%. If you don't,
i.e. if you are happy with left-alignment, don't give it any width.

François de Dardel
Utilisez mon adresse sur noos seulement
Use only my noos e-mail

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting the user control width on the web page width ASP .Net 0 05-22-2008 11:39 AM
Textbox width scaling to width of data not width of page? AndrewF ASP .Net 1 10-10-2005 04:38 PM
css - setting width based on browser width ppcguy HTML 3 08-26-2005 06:51 AM
JComboBox width, dropdown list width Xu Java 11 07-15-2005 11:54 PM
Re: resized image in table extends table width to original image width Sean Jorden HTML 1 08-19-2003 08:59 AM