October 2006

Articles:

September 2006 corrigenda

9.21.2006 Centering an image
Bruno Fassino observes that in this article there could be a problem in Firefox when a user changes the font dimension. In fact, by changing the font dimension changes also the value of the 'line-height' property, so that the image loses its vertical centring in Firefox. A solution could be such as this:
.edicola {
margin: 5px auto;
padding: 0;
text-align: center;
border: 1px solid #999;
width: 150px 15em;
height: 150px 15em;
line-height: 150px 15em;
display: block;
}


* html body .edicola img {
margin:  25px 4em 0 25px 4em 0;
}

img {
width: 133px;
height: 100px;
margin: 0 auto;
padding: 0;
display:inline-block;
vertical-align: middle;
}
The em solution works fine in Firefox. Obviously Internet Explorer needs an hack with em lengths.

Back to the project