WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Breadcrumb NavXT image problem in IE7 (3 posts)

  1. gprego
    Member
    Posted 3 years ago #

    I'm using an image in the first element of the breadcrumb (image for the home) by using this css code:
    .breadcrumbs a:first-child{background: url("myImage") no-repeat;padding-left:14px;}

    This works perfect in all browsers. But IE7 has a problem with the first-child element and comments. If you have a comment, IE7 thinks that this comment is the first child.
    For example, if you have:
    <div class="myDiv">
    <!-- this is my comment -->
    first link
    second link
    </div>
    For IE7 the comment is the first-child.
    And by default, when you use the Breadcrumb NavX you get this code:
    <div class="breadcrumbs">
    <!-- Breadcrumb NavXT 3.8.1 -->
    firstLink / 
    SecondLink / 
    actual page
    </div>
    You can see that before the first link there's a comment. And thats why in IE7 it doesn't show my image.
    Anybody knows a workaround or a way to delete or move the comment?
    thanks

  2. John Havlik
    Member
    Posted 3 years ago #

    Why don't you set the home prefix and suffix (opening and closing span tags) and style that with the correct selectors instead of using the :first-child selector that IE7 doesn't treat properly?

  3. gprego
    Member
    Posted 3 years ago #

    Perfect!! Thakns for that.
    Didn't know what was that for

Topic Closed

This topic has been closed to new replies.

About this Topic