Click to See Complete Forum and Search --> : image alignment


Sonia
09-12-2003, 04:30 AM
The align attribute in the image tag is not used to align the image itself.
For e.g <img src = "image.gif" align = middle> If I write a text here.

The align attribute will align the text beside the image in the middle.
But what if I place another image besides the first one, i.e
<img src = "image.gif" align = middle> <img src = "image2.gif">

Why is the second image not found in the middle of the first one.

Charles
09-12-2003, 04:49 AM
The "align" attribute was depricated back in 1997 and with good reason. Use styles (http://www.w3.org/TR/REC-CSS2/) instead.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Example</title>

<div>
<img alt="[Big Bettie]" src="http://www.bettiepage.com/images/photos/bikini/bikini1.jpg">
<img alt="[Smaller Bettie]" src="http://www.bettiepage.com/images/photos/bikini/bikini1_a.jpg" style="vertical-align:114px">
</div>