RE: sizing a picture on a webpage

  • From: "D!J!X!" <megamansuperior@xxxxxxxxxxx>
  • To: <programmingblind@xxxxxxxxxxxxx>
  • Date: Fri, 28 May 2010 23:55:43 -0400

If you use css like so:
#logo  {
Width:24%;
Height:480px;
}
The image will take 24% of whatever it's parent is, if it's the body
element, then of the page, if it's a div, then the div. if it's a div within
a div, the inner div etc. I believe that it would take 480 pixels no matter
what  because it's not a relative unit.
BTW, don't actually use these values, the picture will surely stretch.
To find out the dimensions of an image, go to the file properties in
windows, in the advance tab I believe it has various properties in a list,
find width and height, or dimensions.
Keep in mind that all this depends on what the other things on your page are
doing, for example, a floating element that has been taken out of document
flow could in fact overlap, go under or over, or somehow mess up the look of
the image on its location or the entire page. It can shift things to the
left or the right, push things above or below it etc. This happens with
floating elements and elements with an absolute position as well.

HTH, D!J!X!

-----Original Message-----
From: programmingblind-bounce@xxxxxxxxxxxxx
[mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of qubit
Sent: Friday, May 28, 2010 11:41 PM
To: bprogramming
Cc: bwebbers
Subject: sizing a picture on a webpage

Hi all --
I asked this on blindwebbers but no one who knows the answer seems to be
online there tonight. I am putting up my personal webpage and want to put a
picture on it so that it is sized to fit in a space that occupies 24% ov the
width of the screen. I read about the css and xhtml for images and still
can't find anywhere that says what the % means when used in the context of
the height or width of a picture. If I say

<img src="whatever.jpg" height="90" width="110">

I assume the numbers refer to pixels, as according to the spec, it can be
either pixels or percent. But if I say width="20%" -- what am I saying? Does
that mean 20% of the whole screen? or the immediately enclosing div? or 25%
the picture's normal size?

The docs tell you to experiment, which is fine if you can see the outcome. 
I'm trying to do this without sighted help.
So does anyone have an answer?
And how do I determine the normal size of this picture?

TIA and happy holidays.
--le


__________
View the list's information and change your settings at
//www.freelists.org/list/programmingblind


__________
View the list's information and change your settings at 
//www.freelists.org/list/programmingblind

Other related posts: