Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 11 of 11

Thread: div after div

  1. #1
    New to the CF scene
    Join Date
    Mar 2009
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    div after div

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

  • #2
    Senior Coder
    Join Date
    Feb 2009
    Location
    Ilkley, West Yorkshire, UK
    Posts
    2,955
    Thanks
    9
    Thanked 726 Times in 720 Posts
    Try removing the space from the div class - that might be the problem.

  • #3
    New to the CF scene
    Join Date
    Mar 2009
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by SB65 View Post
    Try removing the space from the div class - that might be the problem.
    its not the problem!

  • #4
    Senior Coder
    Join Date
    Feb 2009
    Location
    Ilkley, West Yorkshire, UK
    Posts
    2,955
    Thanks
    9
    Thanked 726 Times in 720 Posts
    OK, can you post the rest of the code or a link , then?

  • #5
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    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.
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #6
    New to the CF scene
    Join Date
    Mar 2009
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Code:
    PROBLEM RESOLVED! Thanks to everyone..
    I was messing up with the /> everytime closing the tag and all..

    thanks a lot!
    Last edited by nightrithem; 03-30-2009 at 06:34 PM.

  • #7
    Senior Coder
    Join Date
    Feb 2009
    Location
    Ilkley, West Yorkshire, UK
    Posts
    2,955
    Thanks
    9
    Thanked 726 Times in 720 Posts
    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:

    Code:
    <body id="bd" class="fs3">
    not

    Code:
    <body id="bd" class="fs3" />
    Similarly some of your div tags at the start of the doc are closed as well, like:

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

  • #8
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Please use [code] 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?
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #9
    New to the CF scene
    Join Date
    Mar 2009
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Excavator View Post
    Please use [code] 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?

  • #10
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Quote Originally Posted by nightrithem View Post
    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.
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #11
    New to the CF scene
    Join Date
    Mar 2009
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I was messing up with the /> everytime closing the tag and all..

    thanks a lot problem is resolved!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •