...

View Full Version : An unneeded </div> fixes a problem..but does not validate as XHTML.



aimerzz4
07-22-2008, 01:54 AM
http://www.emmafrostfiles.com/

Scroll all the way down - the footer does not stretch throughout the entire page - it should stretch, but it doesn't. However, if I add a
</div> just before
<div id="footer">
, every thing looks fine. But it doesn't validate as XHTML.

Also, why this: http://validator.w3.org/check?uri=http://www.emmafrostfiles.com


<li><a href="/gallery/fan-art/?album=7&gallery=37">Art</a></li>

Looks like the validator doesn't like the &g - I can't add my FireFox affiliate link either cause it doesn't validate as XHTML...because it has the special characters in the link.

BoldUlysses
07-22-2008, 03:36 AM
Use &amp; instead of plain &, even in links, to validate that. See list here (http://htmlhelp.com/reference/html40/entities/special.html).

macwiz
07-22-2008, 03:40 AM
Use CSS to fix it then. Closing a non-opened element is not a solution to a problem.

aimerzz4
07-22-2008, 04:21 AM
Use CSS to fix it then. Closing a non-opened element is not a solution to a problem.

I know...which is why I need to find a fix. For some reason when I edited the layout (see, before it was fine and the footer did stretch), the footer wouldn't stretch. I can't seem to find the problem, so I'm hoping someone here can.

Footer is already set at 100&#37; thru CSS, so it must be some other div causing the problem.

@msuffern - thanks!

effpeetee
07-22-2008, 05:38 AM
This list (http://www.dragonwinds.com/resources/html-codes.shtml) may be useful.

Frank.

Lochlan
07-22-2008, 07:00 AM
This list (http://www.dragonwinds.com/resources/html-codes.shtml) may be useful.

Frank.

I also like this one: http://www.digitalmediaminute.com/reference/entity/index.php

_Aerospace_Eng_
07-22-2008, 07:05 AM
You never seem to close one of your block quotes plus its inside of a paragraph which you can't do either.

aimerzz4
07-22-2008, 07:02 PM
You never seem to close one of your block quotes plus its inside of a paragraph which you can't do either.

I've tried fixing that but it's the WordPress editor that automatically generates a <p> before and after a blockquote. Maybe I can create a paragraph class as 'quote' instead of 'blockquote,' then maybe the editor will stop generating a <p>.

Anyways, that's not the problem with the footer because I've taken away the blockquote and the extra div - still doesn't work.

_Aerospace_Eng_
07-22-2008, 07:19 PM
Unless I'm missing something the footer seems to be working fine. This is what I see in Firefox 3.0.1

http://img519.imageshack.us/img519/7691/emfio1.th.jpg (http://img519.imageshack.us/my.php?image=emfio1.jpg)

aimerzz4
07-23-2008, 01:44 AM
This is the current code:

<div id="footer">
<div class="footer_inside">
footer stuff
</div><!--end of footer_inside-->
</div><!--end of footer-->

Which displays this (notice the footer does not stretch all the way):
http://www.emmafrostfiles.com/images/df66ter.jpg

However, if I add this </div> like this:

</div>
<div id="footer">
<div class="footer_inside">
footer stuff
</div><!--end of footer_inside-->
</div><!--end of footer-->


It displays what you just showed: http://img519.imageshack.us/my.php?image=emfio1.jpg

However, adding an unneeded </div> marks it as invalid XHTML and may mess with other elements in the future. I need the footer stretch across the entire page without needing the extra </div>. When I had this layout for many months, this did not happen. So, some thing is going on and it's probably due to my messing, though I cannot figure it out for the life of me.

_Aerospace_Eng_
07-23-2008, 01:52 AM
Your current site is still displaying fine and validates when you ignore the blockquote stuff.

aimerzz4
07-23-2008, 03:39 AM
Your current site is still displaying fine and validates when you ignore the blockquote stuff.

It's not the blockquote that's causing the problem.

_Aerospace_Eng_
07-23-2008, 05:36 AM
I KNOW this. IGNORE the block quote stuff and your site validates and looks fine.

aimerzz4
07-23-2008, 08:23 AM
...But....I want the footer to stretch all the way.....without using the misplaced div.

_Aerospace_Eng_
07-23-2008, 02:28 PM
This is the code I used and it seems to work fine. No misplaced </div> anywhere.


</div>
<!--end of wrapper-->
<div id="footer">
<div class="footer_inside">
<p>emmafrostfiles.com<br/>
MARVEL, EMMA FROST, and all related characters: ™ &amp; &copy; Marvel Characters, Inc. All rights reserved. <a href="http://www.marvel.com" target="_blank">marvel.com</a>.<br/>
<a href="http://emmafrostfiles.com/disclaimer/">More on Legal Use</a> | powered by <a href="http://www.aimeeish.com" target="_blank" title="aimeeish.com">aimeeish</a> | designed by <a href="http://www.growldesign.co.uk" target="_blank">growldesign.co.uk</a> </p>
<p><a href="http://www.mozilla.com/en-US/firefox/?from=sfx&amp;uid=231250&amp;aid="><img src="http://www.emmafrostfiles.com/images/ff3.gif" alt="Firefox 3"/></a> <a href="http://www.wordpress.org" title="WordPress" target="_blank"><img src="http://www.emmafrostfiles.com/images/wp-button-4.gif" title="WordPress" alt="WordPress"/></a><br/>
<a href="http://validator.w3.org/check?uri=http://www.emmafrostfiles.com" title="Valid XHTML"><img src="http://www.emmafrostfiles.com/images/tick.png" alt="Valid XHTML 1.0"/>Valid XHTML</a> | <a href="http://jigsaw.w3.org/css-validator/validator?uri=http://www.emmafrostfiles.com/wp-content/themes/eff_v3/style.css" title="Valid CSS 2.1"><img src="http://www.emmafrostfiles.com/images/tick.png" title="Valid CSS 2.1" alt="Valid CSS 2.1"/>Valid CSS</a> | <a href="http://www.emmafrostfiles.com/wp-rss2.php" class="feed">RSS Subscribe</a></p>
</div>
<!--end of footer_inside-->
</div>
<!--end of footer-->
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("&#37;3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-4951063-1");
pageTracker._initData();
pageTracker._trackPageview();
</script>
</body>
</html>

http://img243.imageshack.us/img243/7281/emfqx4.th.png (http://img243.imageshack.us/my.php?image=emfqx4.png)

aimerzz4
07-25-2008, 02:48 AM
That works. Thanks a lot!

Hmm...actually, it still doesn't validate. It keeps saying end of div, which is not open:
# Line 338, Column 68: end tag for element "div" which is not open.

…ontent_wrapper--></div><!--end of wrapper--></div>



The Validator found an end tag for the above element, but that element is not currently open. This is often caused by a leftover end tag from an element that was removed during editing, or by an implicitly closed element (if you have an error related to an element being used where it is not allowed, this is almost certainly the case). In the latter case this error will disappear as soon as you fix the original problem.

If this error occurred in a script section of your document, you should probably read this FAQ entry.
# Error Line 338, Column 69: XML Parsing Error: Opening and ending tag mismatch: body line 94 and div.

…tent_wrapper--></div><!--end of wrapper--></div>


# Error Line 357, Column 7: XML Parsing Error: Opening and ending tag mismatch: html line 2 and body.

</body>

Unless I remove the div, it validates, however, it does't stretch the footer.

effpeetee
07-25-2008, 06:34 AM
My validator shows this.


<div class="nav">
<ul>
<li class="on"><a href="http://www.emmafrostfiles.com/"><span>Home</span></a></li>
<li class=""><a href="#"><span>Biography</span></a>
<ul>
<li><a href="/biography/marvel-universe/">Marvel Universe</a></li>
<li><a href="/biography/ultimate-marvel/">Ultimate Marvel</a></li>


</ul></li>
<li class=""><a href="/archives/"><span>Archives</span></a></li>
<li class=""><a href="/comic-db/"><span>Comics</span></a></li>
<li class=""><a href="/effgallery/"><span>Gallery</span></a></li>
<li class=""><a href="#"><span>Fans</span></a>
<ul>


Empty class - "" without an attribute value.:confused:

Frank

_Aerospace_Eng_
07-25-2008, 07:25 AM
Again I removed that </div> and it does validate and the footer does stretch. That was the screenshot I was showing you without the </div>.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum