Čistý Design wrote:

> Hello
>
> I was always wondering if it's possible to center image in a div - like when 
> you have a photogallery of images that are vertical and horizontal and they 
> are always centered so it looks tidy .... I know how to do it in a table 
> cell, but don't want to use a table. 
> Would anyone please have any suggestion?
>
> Thank you!!!
>
> Jana Forsythová
>  

You might try this code. Not sure it is what you are looking for or not.


.onethird {
float: left;
width: 30%;
margin-right: 1%;
text-align: center;
margin-bottom:auto
}

------------------------------------------------------

<h3>Eric Meyers' CSS2 Test Suite</h3>
<p>In the following table, the cells of the second row should be invisible,
but the space the row would have occupied should still be held open. The third
row should be removed from the table altogether, and its space should not be
held open. Using this CSS;&nbsp;&nbsp; .cl3 {visibility: collapse;}</p>


<div>
<p class="onethird">
<img alt="IE 7" src="images/ie7.gif" class="pic-left" height="124" 
width="113"><br><br>
This is what it looks like in IE 7.</p>

<p class="onethird">
<img alt="Firefox 2" src="images/ff2.gif" height="99" width="125"><br><br><br>
This is what it looks like in Firefox 2.</p>

<p class="onethird">
<img src="images/opera.gif"><br><br>
This is what it looks like in Opera</p>
</div>



______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to