PDA

View Full Version : image formatting question



hwoodfilm
Jun 9th, 2009, 12:38 PM
two things i would like to achieve:

1) center the four images in the window so that there is equal space on both sides within white area

2) have a small white space gap in between each photo

Thanks.
David

abduraooft
Jun 9th, 2009, 12:49 PM
1) center the four images in the window so that there is equal space on both sides within white area
Add a style of text-align:center; to its container element.

2) have a small white space gap in between each photo Add sufficient padding-left and/or padding-right to the images.

hwoodfilm
Jun 9th, 2009, 01:05 PM
i made the images smaller for testing purposes.
i have text-align:center in my mycenter style. but the photos do not center up in the white box. did i put text-align:center in the wrong place?

abduraooft
Jun 9th, 2009, 01:08 PM
did i put text-align:center in the wrong place? Who knows? :rolleyes: Can we have a link to your page?

hwoodfilm
Jun 9th, 2009, 01:31 PM
sorry.

http://www.bhdc90210.com/staffbhdc.html

abduraooft
Jun 9th, 2009, 02:03 PM
Again, that <font> has no purpose there, and should be avoided!

Instead add a div to wrap your images like

<div id="main" class="center">

<a href="sigalbhdc.html"><img width="120" alt="" src="Goldringthumb4.jpg" class="mycenter"/></a>

<a href="beckerbhdc.html"><img width="120" alt="" src="Beckerthumb4.jpg" class="mycenter"/></a>

<a href="alvarezbhdc.html"><img width="120" alt="" src="Pamthumb4.jpg" class="mycenter"/></a>

<a href="fahimbhdc.html"><img width="120" alt="" src="Sudithumb4.jpg" class="mycenter"/></a>
</div>
, and then add
div.center{
text-align:center;
} into your CSS