FF wants div, IE wants span

Discussion in 'CSS' started by belledumonde, Oct 17, 2006.

  1. #1
    im trying to apply a style to something on a wordpress theme and its not very semantic or structural but i just want to give it a style. here's the code i want to apply the style to.

    <h2><a id="homeLink" href="http://belledumonde.awardspace.com/">Home</a></h2>
    <?php wp_list_pages('title_li=' ); ?>
    Code (markup):
    when i surround the code with <div></div> tags, the style is applied in FF but breaks the whole sidebar layout in IE. if i surround the code with <span></span> tags, the layout is fine in IE and the style is applied, but in FF, althought the layout is fine, the style is not applied.

    how do i get around this?

    thanks in advance to anyone who can help!
     
    belledumonde, Oct 17, 2006 IP
  2. bobby9101

    bobby9101 Peon

    Messages:
    3,292
    Likes Received:
    134
    Best Answers:
    0
    Trophy Points:
    0
    #2
    use:
    <h2 class="yourclass"><a id="homeLink" href="http://belledumonde.awardspace.com/">Home</a></h2>
    <?php wp_list_pages('title_li=' ); ?>
    Code (markup):
    in your css use:
    h2.yourclass {
    color: #0000ff;
    font-size: 110%;
    }
    Code (markup):
    of course change the class name in the html and css, and change the css to match your styling
     
    bobby9101, Oct 17, 2006 IP
  3. belledumonde

    belledumonde Peon

    Messages:
    80
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    oh, i managed to fix it! thanks anyway :)
     
    belledumonde, Oct 18, 2006 IP