Subscribevertical-align is specifically for table cells, not arbitrary block elements. However, you can use display: table-cell to make any element behave like a table cell; giving it the ability to align its contents vertically. Unfortunately, this doesn't work in IE6.
#PhotoAlbum a {
display: block;
float: left;
background-color: #eef;
background-position: 50% 50%;
background-repeat: no-repeat;
width: 110px;
padding: 95px 0 3px 0;
text-align: center;
border: #ccc 1px dashed;
margin: 0 10px 10px 0;
font-family: Trebuchet MS;
color: #000;
font-size: 10px;
}
<div id="PhotoAlbum">
<a href="IMG_1736.JPG" title="IMG_1736.JPG" style="background-image: url(IMG_1736.JPG)">IMG_1736</a>
</div>
alt attribute for screen readers and background images do not print using default settings, making it more difficult to print a contact sheet should you need a hard copy.You are not logged in, either login or create an account to post comments
div.image img {
vertical-align:middle;
}
posted by Asparagirl at 10:45 AM on December 8, 2004