SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Addict
    Join Date
    Jul 2008
    Location
    Port Elizabeth, South Africa
    Posts
    396
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    3 divs are stuck inside preceding div

    Hi - please can anyone tell me why on this page:

    http://www.greensmoothie.com/1cde/1mst5.php

    the last 3 divs at the bottom of the page (from the facebook comment image onwards), namely:

    <div class="comfb rc20">...</div> <!--comment facebook-->
    <div class="leafend"></div>
    <div id="footnav">...</div>

    are all stuck inside the div above them, namely:
    <div class="newbox rc20">...</div>

    when newbox has been properly closed off with its </div>?

    Those 3 divs should be inside wrapper, not newbox.

    thanks! - Val

  2. #2
    Life is not a malfunction gold trophysilver trophybronze trophy
    TechnoBear's Avatar
    Join Date
    Jun 2011
    Location
    Argyll, Scotland
    Posts
    5,306
    Mentioned
    213 Post(s)
    Tagged
    5 Thread(s)
    Quote Originally Posted by valarcher View Post
    ...when newbox has been properly closed off with its </div>?
    Looking at it with Firebug, or using the Web Designer Toolbar to outline the divs, both show that newbox rc20 is closed after those three divs, not before. Move the closing tag and you'll be fine.
    Don't be arrogant. Be kind to a koala that thinks it's a bear.

  3. #3
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    23,585
    Mentioned
    411 Post(s)
    Tagged
    6 Thread(s)
    It would be good to run your page through the validator (http://validator.w3.org/) and fix the many errors there, because it's hard to see from looking at the code what's missing. The validator does report a missing </div> tag, though.

  4. #4
    SitePoint Addict
    Join Date
    Jul 2008
    Location
    Port Elizabeth, South Africa
    Posts
    396
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi - ah I apologize for bothering you, there was a missing </div> on one of the items inside newbox.

    Thanks for reminding me to validate! Found a few errors which weren't bothering the browsers, such as <a/> instead of </a>

    (1) The css validator reports:

    .date - Value Error : font / is not a font-family value : italic 0.8em / 1.8 Georgia,serif

    Does that mean that this format (from css2) is now deprecated?
    .date {font:italic 0.8em/1.8 Georgia,serif;...}

    Please what is the correct font format now with css3?

    (2) The html validator reports that xmlns is not supported by my doctype

    It doesn't like

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml"...

    What should this be?

    thank you! - Val

  5. #5
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    23,585
    Mentioned
    411 Post(s)
    Tagged
    6 Thread(s)
    Quote Originally Posted by valarcher View Post
    I apologize for bothering you, there was a missing </div> on one of the items inside newbox.
    No need to apologise. It happens to all of us.

    Thanks for reminding me to validate!
    No problem! It's always a good idea. The validator is a great 'pair of eyes'.

    Does that mean that this format (from css2) is now deprecated?
    .date {font:italic 0.8em/1.8 Georgia,serif;...}

    Please what is the correct font format now with css3?
    CSS2 is still current and will continue to be. CSS3 just adds bits rather than really changing anything.

    The syntax looks OK to me, and I don't see it showing up as a problem in the validator.

    The html validator reports that xmlns is not supported by my doctype
    Yes, that's a mixture of an HTML 4.01 doctype and an XHTML doctype. Given the code on your page, I'd say go with the XHTML doctype:

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">

  6. #6
    SitePoint Addict
    Join Date
    Jul 2008
    Location
    Port Elizabeth, South Africa
    Posts
    396
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thank you!


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
  •