Jump to content
knystrom18

IE Rendered Image Width

Recommended Posts

Images in a simple slideshow I have are 960px wide. I've checked their properties in both Windows and browsers just to be sure.The div these images are in is also 960px wide, but is set by em units; (96em). In IE 9, the images extend past 960px by about 5px. All other browsers get it right. Is there a reason I'm missing for this? Is it fixable through code, or do I need to re-size those images? Screenshot attached.All code accessible at: http://myinnerkitche...actual-site/02/ Thanks.

post-36086-0-76100400-1358107729_thumb.png

Share this post


Link to post
Share on other sites

The image size is correct its the elements using em unit that is the problem, because depending on what font, and font size will affect the size of elements using em unit, if you were to use text resizing ctrl +, ctrl - and ctrl 0 (reset) you will see much it affects these elements. i would consider using px unit instead.

  • Like 1

Share this post


Link to post
Share on other sites

I'm aware the font and font size affect ems. They're relative after all. :rolleyes: I used http://riddle.pl/emcalc/ to put in pixel values and get em values, so, technically I did use pixels... I guess IE just calculates ems differently?

Share this post


Link to post
Share on other sites

Yes! but different browsers render some fonts differently, had same problem with Verdana, some browser show line of text as one row only, while others it took up 2 rows, so trying to get em width element to marry up to 960px width image or acontainer element would be difficult, unless you set up these elements to same unit, OR set it up so its width take up 100% width of parent element.

Share this post


Link to post
Share on other sites

I noticed the different renderings early, but they've never posed me much a problem until now. I put:

 #slider img {width: 100%}

to the offending images, and it works like a charm! Thank you. While I'm thinking about it, any word as to how IE 10 will calculate ems? Hopefully the same way as the other major browsers...

Edited by Coaxsist

Share this post


Link to post
Share on other sites

Who can say, I mean its taken 6-7 years to get it about 98% like other better browsers, i don't use IE 10, so i don't know what it does as regards to using em units, all I have it an IE emulator which shows IE6 to IE10, so all i can say is add another IE version to the IE crap list, to check your website against.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...