Code hack for IE

I just added a hack to this page for IE.

  <!--[if IE]>
    <link rel="stylesheet" title="IE Bugs" href="css/iebugs.css" type="text/css" />
  <![endif]-->

That calls an extra stylesheet only for IE. The stylesheet hardcodes the width of the Google search button. For some reason, IE insists on adding space to both sides of the text on the button, which makes the button much wider than it needs to be. Combined with IE’s poor CSS support, the wider button stretches the gray sidebar. That throws off the spacing of the whole page.

It only took a couple minutes, and that’s still time that shouldn’t have been spent on it. The code is a hack to get around an IE bug. It most likely won’t work well with non-default settings. That’s what you get with hacks for a browser that doesn’t work right – partial implementation that sometimes works. If you don’t want to deal with this hack and others like it, either pester Microsoft until they fix the bugs, or use a browser that doesn’t have these bugs, like Firefox.

Leave a Reply

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

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

Note: This post is over 5 years old. You may want to check later in this blog to see if there is new information relevant to your comment.