Click to See Complete Forum and Search --> : CSS layout


pipia
10-08-2007, 11:27 AM
Hi guys!
I am a CSS newbie and I need some help. I have this css windows which are in a line:
<div id="left"><b><font color="#0099CC"><a href="parprov.htm"><img src="parc.jpg" border="0"></a><br>
<a href="parprov.htm">XXXX</a></font></b><b><br>
XXXX</b><font color="#000000"><br>
xxxxxxxxxxx</font></div>
<div id="left"><b><font color="#0099CC"><a href="parprov.htm"><img src="parc.jpg" border="0"></a><br>
<a href="parprov.htm">XXXX</a></font></b><b><br>
XXXX</b><font color="#000000"><br>
xxxxxxxxxxx</font></div>
<div id="left"><b><font color="#0099CC"><a href="parprov.htm"><img src="parc.jpg" border="0"></a><br>
<a href="parprov.htm">XXXX</a></font></b><b><br>
XXXX</b><font color="#000000"><br>
xxxxxxxxxxx</font></div>
I need them to have intervals between them and to occupy (together with the intervals) a length of 450pxls .. now they are stuck to each other leaving an empty space in the left part of the window
How can I fix it?
p.s. Putting &nbsp; between them rearranges them vertically :(

KDLA
10-08-2007, 01:10 PM
Apply padding to your divs. Multiply your image width by 3, then subtract from 450. Divide the remainder by six (for each side of the three images) and apply this number as the horizontal padding.

KDLA

pipia
10-09-2007, 03:54 AM
It works! Thanks, KDLA :)

Centauri
10-09-2007, 08:40 AM
Also note that it is an error to use the id of "left" more than once, and can cause problems in some browsers - as you need to reuse the style, change the id to a class instead.