knystrom18 Posted January 13, 2013 Share Posted January 13, 2013 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. Link to comment Share on other sites More sharing options...
dsonesuk Posted January 13, 2013 Share Posted January 13, 2013 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. 1 Link to comment Share on other sites More sharing options...
knystrom18 Posted January 13, 2013 Author Share Posted January 13, 2013 I'm aware the font and font size affect ems. They're relative after all. 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? Link to comment Share on other sites More sharing options...
dsonesuk Posted January 13, 2013 Share Posted January 13, 2013 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. Link to comment Share on other sites More sharing options...
knystrom18 Posted January 14, 2013 Author Share Posted January 14, 2013 (edited) 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 January 14, 2013 by Coaxsist Link to comment Share on other sites More sharing options...
dsonesuk Posted January 15, 2013 Share Posted January 15, 2013 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. Link to comment Share on other sites More sharing options...
knystrom18 Posted January 16, 2013 Author Share Posted January 16, 2013 Harsh, but true. Thank you for your thoughts and help. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now