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

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. :slight_smile:

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.

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

No need to apologise. It happens to all of us. :slight_smile:

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:


<!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">

thank you!