Hi, on the following page,
http://stian.freeshell.org/index.php
the floated image in the latest post is shown as tiny/zero-width in
Mozilla 1.7 and Firefox 1.0 (you can just about make it left of the
text), while Opera 8 and MSIE shows it like intended, i.e. using the full
width of the picture.
The CSS is here - http://stian.freeshell.org/default.css
I just started using floated images in my posts, and I had not noticed it
before I tested with Mozilla. I've put the most relevant part of the code
below, although this is possibly caused by some cascading fault from
parent classes (or a bug in Mozilla)?
..imgfloat {
max-width: 100% !important; /* doesn't work? */
text-align: center;
margin: 0.25em;
}
..imgfloat p {
width: 200px; /* for caption wrapping */
font-style: italic;
font-size: 90%;
margin: 0 !important;
}
..picleft {
float: left;
margin-right: 1em;
}
..picright {
float: right;
margin-left: 1em;
}
It also displays correctly if I add the caption paragraph underneath the
image, like in the post directly below. It does not matter if the float
is left or right apparently.
My CSS has become very complicated and interleaved lately (time for a
cleanup), so I have a hard time finding the cause of this through the
different classes, but while testing I found that the problem disappeard
if I remove the width attribute of the 'imgfloat p' class, but this is
not acceptable as it stops any caption text from wrapping correctly ...
:/
Could any CSS-gurus have a look at this and maybe point me in the right
direction to fix this? Is Mozilla to blame or is it my code which is just
too messy? :)
best regards,
Stian Lund