SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Zealot
    Join Date
    May 2006
    Posts
    143
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    FF wants div, IE wants span

    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.

    Code:
    <h2><a id="homeLink" href="http://belledumonde.awardspace.com/">Home</a></h2>
    <?php wp_list_pages('title_li=' ); ?>
    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!

  2. #2
    SitePoint Wizard bronze trophy Tyssen's Avatar
    Join Date
    Oct 2005
    Location
    Brisbane, QLD
    Posts
    4,067
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Can you show the HTML output to a browser?

  3. #3
    SitePoint Addict
    Join Date
    Dec 2005
    Posts
    276
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    <h2>s do not belong in a <span>. Use a <div>.
    "Never imagine yourself not to be otherwise than what
    it might appear to others that what you were or might
    have been was not otherwise than what you had been
    would have appeared to them to be otherwise."

  4. #4
    SitePoint Wizard bronze trophy Tyssen's Avatar
    Join Date
    Oct 2005
    Location
    Brisbane, QLD
    Posts
    4,067
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Divs don't belong in spans either; no block level elements can go inside inline elements.

  5. #5
    SitePoint Zealot
    Join Date
    May 2006
    Posts
    143
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ooh.. i managed to fix it without any extra spans or divs, thanks for the replies though guy!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •