SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Wizard co.ador's Avatar
    Join Date
    Apr 2009
    Posts
    1,054
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    w3 validation error can't find the root of the problem

    HTML Code:
    <div class="shoeinfo1">
    	<img src="images/spacer.gif" alt="spacer" width="95&#37;" height="7" style="position:relative; left:7px;"/>
    		<h2 class="infohead">Giovanni's Restaurant</h2>
    		<div class="video"><img class="line" src="images/Restaurantsimages/giovannisRestaurant.jpg" alt="videoplayer" width="100%" height="100%"/></div>
    
    		<h5> Rate:</h5><h4>
    <ul class="rating nostar" id="GiovannisRestaurant">
      <li class="one"><a   href="javascript:RateItem('Giovanni\'s Restaurant', 1);" title="1 Star">1</a></li>
      <li class="two"><a   href="javascript:RateItem('Giovanni\'s Restaurant', 2);" title="2 Stars">2</a></li>
      <li class="three"><a href="javascript:RateItem('Giovanni\'s Restaurant', 3);" title="3 Stars">3</a></li>
      <li class="four"><a  href="javascript:RateItem('Giovanni\'s Restaurant', 4);" title="4 Stars">4</a></li>
      <li class="five"><a  href="javascript:RateItem('Giovanni\'s Restaurant', 5);" title="5 Stars">5</a></li>
    </ul>
    </h4>
        	<h3>Prosedimiento:</h3>
        	<p>Womens fashion shoes with higher 
        	heels generally have pre-made, thin,
        	flexible, leather or resin rubber fitted
        	soles, made using the bottom pattern
        	created from the last. Two shapes of
        	sole are made this way, one for a Louis
        	heel, and the other for a Knock-on type. </p> 
    	<p><a href="#">More</a></p></div>
    	
    	
    
    
    	</div>
    w3 validator error message

    "# Error Line 206, Column 51: document type does not allow element "ul" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag

    <ul class="rating nostar" id="GiovannisRestaurant">

    The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.

    One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").
    "

  2. #2
    SitePoint Enthusiast
    Join Date
    Dec 2007
    Location
    Oskarshamn, Sweden
    Posts
    83
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    You're not allowed to put a ul tag inside an h4 tag (or any other heading tag for that matter).

  3. #3
    SitePoint Wizard co.ador's Avatar
    Join Date
    Apr 2009
    Posts
    1,054
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    instead of h4 what would be the best practice?

  4. #4
    SitePoint Enthusiast
    Join Date
    Dec 2007
    Location
    Oskarshamn, Sweden
    Posts
    83
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    Well, the ul tag is a block element on its own, so it's usually best not to wrap it inside another block element at all. If you really need to a div would usually be the best choice, I guess.

    In your case it would be best to just remove the h4, though. No need to replace it with another element at all.

  5. #5
    SitePoint Wizard co.ador's Avatar
    Join Date
    Apr 2009
    Posts
    1,054
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ok thank you cletus

  6. #6
    SitePoint Wizard co.ador's Avatar
    Join Date
    Apr 2009
    Posts
    1,054
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    # Error Line 122, Column 33: value of attribute "id" must be a single token

    <ul class="rating nostar" id="El Sabrosura Restaurant">



    This attribute can not take a space-separated list of words as a value, but only one word ("token"). This may also be caused by the use of a space for the value of an attribute which does not permit it.


    When it refers id attribute being in a single token how can that be fixed? because the name has spaces and I don't know what can be done.

  7. #7
    SitePoint Enthusiast
    Join Date
    Dec 2007
    Location
    Oskarshamn, Sweden
    Posts
    83
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    Can't you just replace the spaces with dashes, underscores or remove them altogether?

    <ul class="rating nostar" id="el-sabrosura-restaurant"> would be fine...

  8. #8
    SitePoint Wizard co.ador's Avatar
    Join Date
    Apr 2009
    Posts
    1,054
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you cletus i did that and now it won't do it, but still have to do some php changes

    Cletus i am facing a new problem..

    I fixed and float the <h5> to the left which comes first and manage the margins to adjust the position "wrap" id is not floating to the left in IE7 but in FF, Safari is displaying ok.

    www.nyhungry.com

    Dealing with the margin instead of position property is more effective...

    Thank you guys


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
  •