Muffinresearch Labs by Stuart Colville

Bug: IE7 absolutely positioned italics | Comments (16)

Posted in Browsers on 28th December 2006, 5:06 pm by Stuart

I recently discovered a rather bizarre bug that only seems to affect IE7. If you absolutely position italic text of any kind (text made italic through authors styling or something that is styled via the default browser stylesheet such as ems.) IE7 seems to screw up the rendering and ends up creating a horizontal scrollbar. This problem is best illustrated with an example page (View in IE7 to see the horizontal scrollbar). If you override the font-style then the scrollbar dissappears. Strange.

IE6 doesn’t have any problem with the same code which is interesting and suggests that this bug has been introduced into IE7.

I also noted that the same problem doesn’t exist when the page is rendered in quirksmode.

Figure 1: IE7 See the horizontal scrollbar.

screenshot showing horizontal scrollbars in IE7 caused by absolutely positioning italicized text

Figure 2: IE6 No problem

screenshot showing absolutely positioned italicized text

Post Tools

Comments: Add yours

1. On December 28th, 2006 at 5:35 pm Frances Berriman said:

That’s pretty interesting. I was marking up some quotes with italic cites and such just a couple weeks ago, and I was getting scroll bars. Can’t remember what I did now to get rid of them, so I’m not sure if it was the same bug, but I do remember scratching my head over it for a while. I’ll maybe play with what I had originally again and see if it is this!

2. On December 28th, 2006 at 9:16 pm Heliologue said:

I fully expect this to be fixed by IE8.

3. On December 29th, 2006 at 3:52 am kartooner said:

I remember seeing this when I was messing around with IE7 a few months ago. I’ve yet to figure out why all of a sudden version 7 does this, while version 6 does not? It’s obvious a tweak they made, maybe to fix something triggered this display bug.

It’s odd.

4. On December 29th, 2006 at 8:18 am zproxy said:

As a workaround you can add

p{
        overflow: auto;
}

This will most likely fix the problem :)

5. On December 29th, 2006 at 11:26 pm Stuart Colville said:

Thanks zproxy, that looks to be a suitable fix. I’ve added a test page with that here: http://muffinresearch.co.uk/code/xhtmlandcss/ie7italics/index3.html

Interestingly I found that zoom:1 also worked in this example but in my original page where the italic text was nested within a the div zoom:1 didn’t work. Thus I recommend using overflow:auto as zproxy suggested.

6. On December 31st, 2006 at 12:36 am Jen said:

Actually, a similar problem exists in IE6:
http://www.thescripts.com/forum/thread96080.html

I came across this a few months ago. It didn’t have anything to do with absolute positioning, at least not in my instance. I had a div that was float:right, and the text was italicized, giving a horizontal scrollbar. Very bizarre!

Interesting to see that the problem still exists in IE7…. not surprising though :(

7. On January 9th, 2007 at 3:05 am Max Design - standards based web design, development and training » Some links for light reading (9/1/07) said:

[...] Bug: IE7 absolutely positioned italics [...]

8. On January 11th, 2007 at 2:00 pm Scroll horitzontal al mesclar position: absolute i font-style: italic - a.css, esbudellant estŕndards said:

[...] Font: Bug: IE7 absolutely positioned italics [...]

9. On January 11th, 2007 at 5:45 pm alberto said:

[...] Ya hemos empezado con los bug de explorer 7, en este caso lo ha descubierto muffinresearch y are lo ha solucionado (en catalán, eso sí ): [...]

10. On March 8th, 2007 at 12:37 am Cody said:

Was wondering what the hell the problem was for about 2 hours before I decided to search google and came up with your site..

I would have never have thought this would be a glitch in IE7..

THANK YOU!

11. On March 23rd, 2007 at 10:53 pm jordi said:

damn IE7!

all the afternoon trying to fix by myself this annoying thing until i thought, let’s search forums ;P

i used overflow: auto where is the font-style: italic and it got fixed! thanks guys!

jordi.

12. On April 4th, 2007 at 8:40 pm Gene Spesard said:

I just ran into a somewhat similar problem in that when I had a div of menu items floated left all the CSS and links disappeared when there were italics to the right of it. It didn’t matter if the italics came from CSS or a <i> tag. Adding the overflow: auto; fix to the class I was using for the italics text “fixed” it.

13. On April 25th, 2007 at 8:20 pm AndreyT said:

Strictly speaking, this has nothing to do with absolute positioning. It is a general big with italic text. Just try

Text

and you’ll get the same problem.
overflow: auto’ does indeed help as a workaround.

14. On May 2nd, 2007 at 3:30 am DonC said:

Oh MAN!!! I spent an entire DAY today trying to figure this one out! This is THE most bizarre thing I’ve ever seen.

My page had a bunch of text (from an xml document) in the middle column and two navigational columns, left and right (PHP includes). Any link lower on the page than the first italics in the center column would not work! Only in IE7, of course. The left and right columns were included BEFORE the middle column, so it really made no sense.

Inexplicably, the overflow:auto on the center column worked. Crazy.

15. On November 22nd, 2007 at 6:09 pm MMJ said:

I just discovered this bug, very interesting. It also applies to the <em> tag.

16. On February 28th, 2008 at 1:14 pm stephan said:

Stupid bug. It cost me an hour to find out what was the cause. Why doesn’t Microsoft repair it in one of the updates …?







XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>



Scrolling issue in Leopard cured with PRAM reset|(0)

Having got a shiny new MacBook Pro to work on at my new workplace I’ve had a couple of strange problems with Leopard. The main issue was that when scrolling the graphics was suffering what appeared to be a strange redraw problem when scrolling. After googling I found this post:“Distorted graphics in Leopard when scrolling”.

Fortunately for me: resetting the PRAM has worked and the flickering issue has gone for now.

Using git with Django’s SVN repository|(0)

Brian Rosner has produced a really nice screencast demonstrating ways to use git version control with Django’s SVN repository. Especially of interest is how merging changes you’ve made in your git branch of Django with updates from the Django SVN repository is really straightforward.

Photos on Flickr

© Copyright 2004-08 Stuart Colville, all rights reserved. May contain traces of Muffin. Powered by WordPress. Hosted by WebMax Nefarious Muffins. This page was baked in 1.019s.