Click to See Complete Forum and Search --> : pictures positioning


Taurus
05-20-2004, 09:14 AM
I’d create simple html page, internal style sheet.
I need place pictures in two lines, in the first line-3 pictures, the second -2 pictures. How to position a pictures use CSS code(without tables)? Also, are the image height/width the necessary attributes?

DaveSW
05-20-2004, 09:37 AM
are the pics the same dimensions?

you can either use:

<img src="" alt="" style="position: absolute; left: XXpx; top: XXpx;">

or

<img src="" alt="" style="float: left;">
and add clear:left; where you want to break a new line in.

Alternatively the super easy way:

<div>
<img>
<img>
<img>
</div>

<div>
<img>
<img>
</div>

Taurus
05-20-2004, 09:37 AM
no, pictures are not the same size.
Just sample

DaveSW
05-20-2004, 09:42 AM
In that case I'd go the super easy way:

<div style="text-align: center;">
<img>
<img>
<img>
</div>

<div style="text-align: center;">
<img>
<img>
</div>

and maybe add in the head section of your document:

<style type="text/css">
<!--
div img {
margin: 10px;
}
-->
</style>

Taurus
05-21-2004, 02:35 PM
What is right DOCTYPE for this html page?

ray326
05-21-2004, 10:25 PM
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">