Forum Moderators: not2easy

Message Too Old, No Replies

A strange margin under content (html tag)

         

etcetera9

12:34 pm on Feb 7, 2010 (gmt 0)

10+ Year Member



Hi,

I see a small space under my page. It is as if the html tag has style margin-bottom: 10px or something but it doesnt actually. I dont want that gap. I also observed this unusual behavior on some websites. Here is an example: <snip>

You may not see the gap by eye only. If you have Firebug, you can see it under all the content.

Any ideas?

[edited by: limbo at 8:10 pm (utc) on Feb 7, 2010]

rocknbil

6:30 pm on Feb 7, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome aboard etcetera9, your link will be removed - See #13, TOS [webmasterworld.com]. But I think I see the problem without looking at your CSS.

....
</body>
</html>
<div id='blank'></div>
<script type='text/javascript'>
// removed
</script>


This is invalid outside the body. Move that like so:

....
<div id='blank'></div>
<script type='text/javascript'>
// removed
</script>
</body>
</html>


Second, I don't see any XML here, am I missing something? If this document is not XML, I don't think you need

<?xml version='1.0' encoding='utf-8' ?>

Instead, after the doctype declaration, use

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

Make the doctype the first line, and this should move you closer to validation [validator.w3.org].

You're pretty close, move that, make those head alts, turn the & into &amp;, and you should get a green light on validation and your problem will probably go away.