...

View Full Version : div after div



nightrithem
03-30-2009, 04:29 PM
Errors found while checking this document as XHTML 1.0 Transitional!

Line 13, Column 67: document type does not allow element "div" here

…iv id="vdepth-header" class="wrap" /><div class="main clearfix" /><h1 class="

why is this happening??

can someone help me?
i dont want to use same div for all classes e.g. <div class="main main2 main3"> i want it to be like
<div class="main"><div class="main2"><div class="main3">

SB65
03-30-2009, 04:33 PM
Try removing the space from the div class - that might be the problem.

nightrithem
03-30-2009, 04:37 PM
Try removing the space from the div class - that might be the problem.

its not the problem!

SB65
03-30-2009, 04:39 PM
OK, can you post the rest of the code or a link , then?

Excavator
03-30-2009, 04:46 PM
Hello nightrithem,
When the validator returns an error like "document type does not allow element "xxx" here" it usually indicates something wrong above it.
We'd need to see all your code.

nightrithem
03-30-2009, 04:46 PM
PROBLEM RESOLVED! Thanks to everyone..


I was messing up with the /> everytime closing the tag and all..

thanks a lot!

SB65
03-30-2009, 05:00 PM
Much easier for everyone if you use the code tags to wrap your code - you can edit the post to do this.

OK, well for starters I think the body tag should be:


<body id="bd" class="fs3">

not


<body id="bd" class="fs3" />

Similarly some of your div tags at the start of the doc are closed as well, like:


<div id="vdepth-header" class="wrap" />

If you start with the body tag and then work through the validation errors that'd be a start.

Excavator
03-30-2009, 05:06 PM
Please use
tags when your posting code. That's the * button in the post editing window.

Your closing all your div tags with />
If that even woreds it would defeat the whole purpose of divs by closing them before there's anything in them.

It should go more like this -
[CODE]<div id="header">
header stuff goes inside
<!--end header--></div>
See how we don't close the header div till all the header stuff is done?

nightrithem
03-30-2009, 05:10 PM
Please use
tags when your posting code. That's the * button in the post editing window.

Your closing all your div tags with />
If that even woreds it would defeat the whole purpose of divs by closing them before there's anything in them.

It should go more like this -
[CODE]<div id="header">
header stuff goes inside
<!--end header--></div>
See how we don't close the header div till all the header stuff is done?

I do understand this, i just did </div /> for a trial but before doing this it returned me the same errors.

can you please try to validate the code and look at the errors for your self?

Excavator
03-30-2009, 05:20 PM
I do understand this, i just did </div /> for a trial but before doing this it returned me the same errors.

can you please try to validate the code and look at the errors for your self?

We'd be happy to take a look at it. Post the real code though, not the trial.

nightrithem
03-30-2009, 06:35 PM
I was messing up with the /> everytime closing the tag and all..

thanks a lot problem is resolved!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum