-3

I'm working on http://companies.ur-nl.com/ seems Logo (its H1) image in header is not rendered in IE7, it works within FF and other browsers, Please help me out of this

HTML

    <div id='logo'>
      <h1>
         <a href='/' title='Some Text HERE'>
           Some Text HERE
         </a>
      </h1>
   </div>

CSS

#logo {
    float: left;
}
#logo a {
    background: url("http://companies.ur-nl.com/assets/logo_image_name.png") no-repeat scroll 0 0 transparent;
    display: inline-block;
    height: 62px;
    margin: 35px 0 0;
    text-indent: -100000px;
    width: 195px;
}
Chandrakant
  • 1,971
  • 1
  • 14
  • 33

4 Answers4

2

This is quite a well known text-indent bug for IE7, for example see Text indent is not working in ie7

However, I could not get the solution for that question to work on your site. Instead you can remove the text-indent and replace with:

line-height: 0;
font-size: 0;

which seems to work nicely in the Chrome30, IE7 and IE9 browsers I tested with.

Source: Solved: IE7 Negative Text-Indent CSS Bug

Community
  • 1
  • 1
andyb
  • 43,435
  • 12
  • 121
  • 150
0

add this to your css

#logo a{display:block;}
Abdul Malik
  • 2,632
  • 1
  • 18
  • 31
0

Define This css

#logo a{
display:inline-block;  // remove this line
display:block;  // add this line
}
Rohit Azad Malik
  • 31,410
  • 17
  • 69
  • 97
0

That's because inline-block property isn't fully supported in IE7.

If for some reason you absolutely need the anchor inside the logo container to be an inline-block element for the major browsers, you can leave the display: inline-block rule and add a hack for IE7 like this:

#logo a {
    display: inline-block;
    *display: block;
}
Bart Az.
  • 1,644
  • 1
  • 22
  • 32