inline background image in IE

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • GluteHam
    New Member
    • Jul 2007
    • 40

    inline background image in IE

    OK, so here's a new one for the group...

    I have the two following classes:

    .ratings_link {
    display: block;
    background: #ffeec1 url(image.gif) no-repeat center right;
    font: bold Arial, Helvetica, sans-serif;
    color: #176fcc;
    text-decoration: none;
    margin-top: 3px;
    }

    .ratings_link_i nline {
    background: #ffeec1 url(image.gif) no-repeat center right;
    font-family: Arial, Helvetica, sans-serif;
    font-weight: bold;
    color: #176fcc;
    text-decoration: none;
    padding: 1px 20px 1px 1px;
    }

    The first class works just fine as it displays block style. The background image is aligned right, with no repeat. Wonderful.

    Now, for the second, I need this to be an inline style. Everything seems to work fine but the background image does not show in IE. I tried inserting display:inline in the class, but that does nothing. Nor does putting it inside a div. Simply, the code is:

    1. <a href="link.htm" class="ratings_ link">link 1</a>
    2. <a href="link.htm" class="ratings_ link_inline">li nk 1</a>

    Any suggestions? Thanks.
  • drhowarddrfine
    Recognized Expert Expert
    • Sep 2006
    • 7434

    #2
    Hm. Works for me. .

    Comment

    • GluteHam
      New Member
      • Jul 2007
      • 40

      #3
      Really?? I've checked in both IE 6 and 7.

      Please look at it on an actual page:
      http://granthansen.com/bg_test.html

      Do you see the red square on the second style?

      I found this article that explains IE doesn't handle positioning well for non-block items:

      http://www.satzansatz. de/cssd/wrappinglinkbg. html

      Thanks!

      Comment

      • GluteHam
        New Member
        • Jul 2007
        • 40

        #4
        I'm noticing some positioning things ... now it's showing up, just not in the right place :-)

        Comment

        • GluteHam
          New Member
          • Jul 2007
          • 40

          #5
          I got her working ... needed an IE hack though

          http://granthansen.com/bg_test.html

          Thanks for your help!

          Comment

          • drhowarddrfine
            Recognized Expert Expert
            • Sep 2006
            • 7434

            #6
            I do not see the problem in IE6 but I do only partially see the red square in IE7. I had only checked in IE6 before. The solution is not obvious right now but I'm not really here today (out of the office).

            Comment

            Working...