SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Addict
    Join Date
    Mar 2003
    Location
    UK
    Posts
    245
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    My Xhtml (Transitional) Won't Validate?

    Can someone help?
    My latest site won't validate, and I dont know why, here is an extract from the results from the W3C Validator from the index page (I get about 9 of these errors)
    Code:
    Line 87, column 6: document type does not allow element "h3" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag
    <h3>Win a cookery school place with chef John Benson-Smith</h3>
    I have doen other Xhtml Transitional sites before and have got them validated no problems, but I have never seen this error before. The Validator usually throws up an example link for errors, but not with this one.
    Link to site
    Thanks for any insites in to what I have done wrong, It's probbaly a dumb mistake.

  2. #2
    gingham dress, army boots... silver trophy redux's Avatar
    Join Date
    Apr 2002
    Location
    Salford / Manchester / UK
    Posts
    4,838
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you're trying to put block level elements (the P tags, now that i checked) inside an inline element (the <span class="GreyLink">)

    instead of an inline element, use a block element, e.g. <div class="GreyLink"> (don't forget to change the related closing </span> to </div>
    re·dux (adj.): brought back; returned. used postpositively
    [latin : re-, re- + dux, leader; see duke.]
    WaSP Accessibility Task Force Member
    splintered.co.uk | photographia.co.uk | redux.deviantart.com

  3. #3
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,235
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    It's not your <h3> itself, it's the unclosed <span> above it.
    HTML Code:
     <span class="columed">
    	  <h3>Win a cookery school place with chef John Benson-Smith</h3>
    	  <h4>win! win! win!</h4>
    
    	  <p>This delicious dessert is an absolute winner and will 
    	  Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, 
    	  eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.</p></span>
    	  <!-- InstanceEndEditable --></div>
    A block-level element like <h3> or <p> can't be in a <span>, which is an inline-level element. Change your <span> to a <div> and all will be well .

    Edit:


    redux: 1; me: 0

  4. #4
    gingham dress, army boots... silver trophy redux's Avatar
    Join Date
    Apr 2002
    Location
    Salford / Manchester / UK
    Posts
    4,838
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    re·dux (adj.): brought back; returned. used postpositively
    [latin : re-, re- + dux, leader; see duke.]
    WaSP Accessibility Task Force Member
    splintered.co.uk | photographia.co.uk | redux.deviantart.com

  5. #5
    SitePoint Addict
    Join Date
    Mar 2003
    Location
    UK
    Posts
    245
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Opps, thanks. I knew it would be something silly, that I couldn't see.


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
  •