SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Evangelist stonedeft's Avatar
    Join Date
    Aug 2009
    Posts
    589
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    will this code validate?

    Hello forums I'm trying to nest some divs and was wondering if this code will validate:

    <div class="sideBox">
    <div id="content1"><p>Lorem ipsum dolor sit amet</p></div>
    </div>

    <div class="sideBox">
    <div id="content2"><p>Lorem ipsum dolor sit amet</p></div>
    </div>


    Is it ok to nest an id-ed div inside a class-ed div?

    thanks
    Don't Panic

  2. #2
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,810
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Completely valid code.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  3. #3
    billycundiff{float:left;} silver trophybronze trophy RyanReese's Avatar
    Join Date
    Oct 2008
    Location
    Whiteford, Maryland, United States
    Posts
    13,585
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Yes it is, although you could have validated it to find that out for yourself .
    Twitter-@Ryan_Reese09
    http://www.ryanreese.us -Always looking for web design/development work

  4. #4
    SitePoint Evangelist stonedeft's Avatar
    Join Date
    Aug 2009
    Posts
    589
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by felgall View Post
    Completely valid code.
    Thanks Stephen

    Quote Originally Posted by RyanReese View Post
    Yes it is, although you could have validated it to find that out for yourself .
    yes I could have but I'm working on my localhost and I don't want to go into the trouble of uploading it on a live server to validate it on validator.w3.org It' much easier to ask don't you think?
    Don't Panic

  5. #5
    Ripe Tomatos silver trophybronze trophy Rayzur's Avatar
    Join Date
    Jun 2007
    Location
    Texas
    Posts
    4,174
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    I don't want to go into the trouble of uploading it on a live server to validate it on validator.w3.org It' much easier to ask don't you think?
    You don't have to upload your files to a server to validate them at W3.
    It gives you the option to validate by "File Upload" and "Direct Input".

  6. #6
    SitePoint Evangelist stonedeft's Avatar
    Join Date
    Aug 2009
    Posts
    589
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Rayzur View Post
    You don't have to upload your files to a server to validate them at W3.
    It gives you the option to validate by "File Upload" and "Direct Input".
    Again there is the issue of uploading it . direct input won't do... I have some files included using php includes and some contents on the database , and copying snippets of the code on the direct input text box won't validate

    uhmm is it so hard to just ask ...
    Don't Panic

  7. #7
    Ripe Tomatos silver trophybronze trophy Rayzur's Avatar
    Join Date
    Jun 2007
    Location
    Texas
    Posts
    4,174
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    uhmm is it so hard to just ask ...
    You are free to ask all the questions you like around here.

    I was just letting you know that files can be uploaded from your local machine to the validator and that they do not have to be on a server.

  8. #8
    Is Still Alive silver trophybronze trophy RetroNetro's Avatar
    Join Date
    Jul 2003
    Location
    Texas
    Posts
    6,883
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    You can also check validation locally with firefox plugins like "HTML validator" and the "web developer toolbar".


Bookmarks

Posting Permissions

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