I don’t want to see HTML for a long time

If I’m honest, I’m sure most of my problems have been self-inflicted and my ‘solution’ is little more than an unsatisfactory hack but if it means I don’t have to look at any HTML for a few weeks, it will do.

I eventually tracked down this problem to a difference between how Firefox and IE6 handle consecutive <br /> tags inside <pre> tags. IE effectively collapses them into a single <br /> tag and Firefox doesn’t. I tried various solutions, most of them based on using <code> tags for code examples instead of <pre> tags, but that would have involved extensive manual edits. I’d foolishly assumed I’d be able to avoid such things when blogging.

Applying a little lateral thinking to the problem, I decided to replace <br /><br /> with <br /><p></p><br /> to try to kid IE6 into thinking that there was something between the <br /> tags. It looks like it’s worked and Firefox and IE now display the same line spacing, which is all I was looking for in the first place. I wouldn’t say the formatting of every entry in the blog is perfect, but I doubt I’ll be improving it any time soon, if ever. I’ve wasted far too much time on it, but the fact is I’m pretty chuffed with how the code examples look and maybe it was worth it.

One unexpected benefit of having to mess around with this is that I’ve been using mysql for the first time. I’ve only been running a bit of SQL and digging around the Serendipity schema but it’s been an unexpectedly pleasant experience.

Now, for my sins, I have to drive my daughter and her mum through to Glasgow airport for a 2am check-in for their holiday in Spain. It’ll be a nice break from HTML and CSS 😉

Leave a comment

Your email address will not be published. Required fields are marked *