Relative sizing of images in IE

liunx

Guest
Hi all,

I have been struggling with an IE problem (there's a surprise) relating to relative sizing of images. I'm trying to build a site (<!-- m --><a class="postlink" href="http://vfda.asn.au/">http://vfda.asn.au/</a><!-- m -->) with sizing done by ems. I have a three absolute positioned columns: one fixed width (in ems) and the other two percentage sized, so they resize with different page sizes (like webstandards.org). In the sidebar I wanted to add an image: 80% of the column width and proportional height (the current site is fixed width). This worked fine in Firefox, but IE seemed to take the 80% width from the body width rather than the column that the image was contained in. Anyone have any ideas why this would be happening?

Thanks,

Sam

PS Any advise about relative sizing of images would also be appreciated.It should work if you are in standards mode.IE has a standards mode???IE was the FIRST to have a "standards mode". Use a complete doctype to set all browsers into standards compliant mode.My understanding is that the doctype I have been using does place the browser in standards mode:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Is this incorrect?

Thanks again.it does, but using a stricter doctype does make the browser more standards compliant (thus less quirky) posibbly eliminating your problem.XHTML 1.0 is standards mode.
Show the problem code in question.I appreciate the help.
This page (<!-- m --><a class="postlink" href="http://vfda.asn.au/test.shtml">http://vfda.asn.au/test.shtml</a><!-- m -->) replicates the error. Sorry for not narrowing it down further. There is a "content" division that contains three others: "main", "navbar" and "sidebar". I'm trying to get an image to show up as 80% of the sidebar width, so it will resize (slightly) with differing page widths.#sidebar has no width defined (try width:20%; ). IE assumes it's the width of the page.

BTW keep units for widths the same. Mixing % and em can have unexpected results.Thanks for the advice! I'll check it out.

Sam
 
Back
Top