----- Original Message -----
From: "David Sánchez (Zeleznicná Stanica)" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Wednesday, December 26, 2007 8:49 PM
Subject: [css-d] image resize does not work in Opera when setting width
andheight 100%
> In the frontpage, I must show an image (according the headline news)
> from 477x200. This would look good in resolutions up to 1024x768, but
> in other resolutions (like 1280x768) the image look just to small
> inside it box.
>
> So what I'm doing is aplying the following properties to the image:
>
> .headline img{
> border:1px dotted #666;
> width:100%;
> height:100%;
> }
>
> This works perfect in Firefox and IE, but in Opera it just shows a dot
> instead the image. I just don't get it.
>
> The page (still under developement) can be found here
>
> http://curefans.com/newsite/
>
> David.
12/26/2007
David:
WOW, that's a lot of CSS! Looks nice in FF. First, you have a number of
validation errors on both the XHTML and CSS side. You have uncoded special
characters in some of the URLs, and you seem to have a closing </label> tag
with no opening partner. Ignore the CSS display: inline-block error, and
just fix the hexadecimal color error.
...
width: 100%;
height: 100%;
...
says that the image will be 100% the width and height of its parent
container. It's possible that if the container has no explicit or forced
dimension, the image will not either; and Opera isn't cooperating by using
the dimensions declared in the <img> tag. Try adding,
.headline img {
...
display: block;
/* and-or */
margin-bottom: 0;
...
}
Otherwise, some other erudite soul will give you the Cure.
Best Regards,
Peter
www.fatpawdesign.com
______________________________________________________________________
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/