IE7 Problem with sIFR when <br> is inside an H3

Posted by David Fox on Stack Overflow See other posts from Stack Overflow or by David Fox
Published on 2009-08-12T00:49:28Z Indexed on 2010/06/11 10:02 UTC
Read the original article Hit count: 215

Filed under:

I have a problem I just discovered when viewing certain pages in IE7. If I have a very long header that wraps to a second line, or worse, if I put a BR in the middle, that throws off the spacing.

One page to look at:

broken example1

You'll notice that the margin at the top of the page gets offset as the headings are rendered, throwing everything off.

I'm using code like this:

<h3 style="margin:0"><a href="../books/msc1.html">Middle School Confidentialâ„¢<br>
Book 1: Be Confident in Who You Are</a></h3>

but repeated many times to exaggerate the problem.

I tried another test where I removed the BR and let the lines wrap naturally. This is an improvement in terms of the spacing, but it doesn't fix the problem. (Same URL but make it m1.html)

In the third example, each heading takes up only one line (m2.html)

One option would be to just split up the heading onto two lines, each with its on H tags. But since these are links, then it will appear that the first line might go to one place, and the second to another, since they wouldn't change color simultaneously as you roll over them.

So, any solutions to this?

I believe I have the current version of sIFR 3. I don't want to upgrade to IE8 until I know this is resolved.

Thanks!

© Stack Overflow or respective owner

Related posts about sifr