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 7 of 7
  1. #1
    New to the CF scene
    Join Date
    Nov 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Validation Output Errors - attributes and Li

    Hi all,
    just having some issues with my coding.
    my validation on w3.org brings back some issues i'm struggling to fix.
    I've seen some other posts about this but i've tried what they have said, and they are still coming up.
    And some lines look the same and are not coming up as issues.

    first issue -
    Line 59, Column 36: there is no attribute "leftmargin"
    This is also for "topmargin" "leftmargin" marginwidth etc
    if i remove this line, will this affect anything?

    Second issue -
    Line 90, Column 14: document type does not allow element "li" here; missing one of "ul", "ol", "menu", "dir" start-tag

    <li><a class="trigger" href="#">Weddings</a>

    Full code -
    <li><a class="trigger" href="#">Weddings</a>
    <ul>
    <li><a href="weddings.html">Weddings at Tokar Estate</a></li>
    </ul>
    <li><a class="trigger" href="#">Functions</a>
    <ul>
    <li><a href="functions.html">Function at Tokar Estate</a></li>
    </ul>
    <li><a class="trigger" href="#">Events</a>
    <ul>
    <li><a href="upcoming-events.html">Upcoming Events</a></li>
    </ul>
    <li><a href="http://utils.impactdata.com.au/pages/2394/imagegallery080105/login.html" target="_blank">Image Gallery</a></li>
    <li><a class="trigger" href="contact.html">Contact Us</a>
    <ul>
    <li><a href="join.html">Join</a></li>
    <li><a href="location.html">Location</a></li>
    <li><a href="links.html">Links</a></li>
    <li><a href="contact.html">Contact</a></li>
    </ul>
    </li>
    </ul>
    </div></td>

    please help

  • #2
    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 andrewjackson,
    It's pretty clear what the validator is telling you, no such thing as leftmargin so removing it isn't going to do much.
    And list items need to be enclosed in some sort of list container, either an unordered list or an ordered list.

    See HTML ul here.
    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

  • #3
    New to the CF scene
    Join Date
    Nov 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Its seem as though with this site, i do need the leftmargin etc with the way its set out. Note - i did not build this site, have taken it over, it was built by someone else. Its a static site (which i am building a new dynamic site) but need to maintain this site for the time being.

    It also makes a difference when i change any li or ul as they are drop down menu's , which is the trigger lines

    The W3 markup validation is telling me all these errors for li and ul entries but if i change them, it changes the layout of the site

  • #4
    Regular Coder
    Join Date
    Aug 2011
    Location
    U.S.A.
    Posts
    233
    Thanks
    2
    Thanked 48 Times in 48 Posts
    What does line 59 actually say? If it's an attribute, maybe you need to replace it with it's css equivalent, "margin."

    The W3 markup validation is telling me all these errors for li and ul entries but if i change them, it changes the layout of the site
    I'd say you are in a pickle then, because if you want your site to validate, you are going to have to adjust your site, which means you are going to have to recode some things to make it work as it should. It stinks, but this is kind of an either/or situation. Either you want valid markup or you don't. You can't have it both ways.
    WordPress Designer and theme developer. KlongDesigns - helping bloggers and non-technical folks claim their space on the internet.

  • #5
    Regular Coder
    Join Date
    Oct 2010
    Location
    San Antonio Tx
    Posts
    251
    Thanks
    12
    Thanked 11 Times in 11 Posts
    its not working cause leftmargin isn't in css its left-margin and top-margin you need a hyphen also your lists are all messed up heres how a list should look.

    Code:
    <ul> which is the unordered list- its the container for your list items
    <li>List item</li>the list item is nested inside the list tag 
    </ul> the closing unordered list tag
    or if you want a numbered list or "ordered list" replace ul with ol try adjusting your code using what I just told you and see how it validates then

    so a review without the comments
    Code:
    <ul>
    <li>List Item</li>
    <li><a href="">List Item with a link</a></li>
    </ul>
    
    <ol>
    <li>List item that will be numbered</li>
    <li><a href="">List item that will be numbered and also linked</a></li>
    </ol>
    Last edited by NoeG; 12-02-2011 at 03:55 PM. Reason: Edited to better explain

  • #6
    Senior Coder
    Join Date
    Feb 2009
    Location
    Ilkley, West Yorkshire, UK
    Posts
    2,956
    Thanks
    9
    Thanked 727 Times in 721 Posts
    Quote Originally Posted by NoeG View Post
    its not working cause leftmargin isn't in css its left-margin and top-margin
    No.

    margin-left and margin-top

  • #7
    Regular Coder
    Join Date
    Oct 2010
    Location
    San Antonio Tx
    Posts
    251
    Thanks
    12
    Thanked 11 Times in 11 Posts
    Oh whoops sorry andrewjackson


  •  

    Tags for this Thread

    Posting Permissions

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