2005-04-17

This page is was valid XHTML 1.0 Strict!

The Blogger navbar was, a part from being annoying, something what caused Blogger pages not to be valid XHTML 1.0. There is a simple way to fix this. Blogger appends the code for the navbar to the last occurrence of the body tag. Putting a second body in HTML comment doesn't work, CDATA will do the trick. Note that you need the div for a valid CDATA block:

<body>
<div><![CDATA[<body>]]></div>

Update: Internet Explorer doesn't handle the CDATA correctly. You might want to add a class to the div in order to set it's display value to none.

<body>
<div class="hide"><![CDATA[<body>]]></div>

Update 2006-01-11: Removed these hacks. The flag button and BlogThis scripts caused to many problems. Also, you can't get your whole blog valid XHTML 1.0 Strict because of the HTML used in the comments. I now use a CSS rule to hide the navbar:

body #b-navbar { display: none !important; }

7 comments:

Manas said...

Cool hack.I was looking for this.

Manas said...

The page is not showing up correctly in Opera.Plz see.

-_- streetartist SeX-_-.4rtist.com -_- said...

hi
do you think the hidden navbar is allowed ?

Interesting hacks on your blog


WWW.6reetings_from_SeX-_-.█════███████████─────.4rtist.com

Hinderik said...
This comment has been removed by a blog administrator.
Hinderik said...

see here

Hinderik said...
This comment has been removed by a blog administrator.
Hinderik said...

ok.. smart me, i chose to publish via ftp outside blogger's domain for the blog with that option