Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 11-30-2011, 03:28 AM   PM User | #1
andrewjackson
New to the CF scene

 
Join Date: Nov 2011
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
andrewjackson is an unknown quantity at this point
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
andrewjackson is offline   Reply With Quote
Old 11-30-2011, 03:39 AM   PM User | #2
Excavator
Master Coder


 
Excavator's Avatar
 
Join Date: Dec 2006
Location: Alaska
Posts: 9,410
Thanks: 22
Thanked 1,765 Times in 1,749 Posts
Excavator has a spectacular aura aboutExcavator has a spectacular aura aboutExcavator has a spectacular aura about
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
Excavator is offline   Reply With Quote
Old 12-01-2011, 11:19 PM   PM User | #3
andrewjackson
New to the CF scene

 
Join Date: Nov 2011
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
andrewjackson is an unknown quantity at this point
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
andrewjackson is offline   Reply With Quote
Old 12-02-2011, 01:30 PM   PM User | #4
resdog
Regular Coder

 
Join Date: Aug 2011
Location: U.S.A.
Posts: 233
Thanks: 2
Thanked 48 Times in 48 Posts
resdog is on a distinguished road
What does line 59 actually say? If it's an attribute, maybe you need to replace it with it's css equivalent, "margin."

Quote:
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.
resdog is offline   Reply With Quote
Old 12-02-2011, 03:49 PM   PM User | #5
NoeG
Regular Coder

 
Join Date: Oct 2010
Location: San Antonio Tx
Posts: 251
Thanks: 12
Thanked 11 Times in 11 Posts
NoeG is an unknown quantity at this point
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
NoeG is offline   Reply With Quote
Old 12-02-2011, 04:09 PM   PM User | #6
SB65
Senior Coder

 
Join Date: Feb 2009
Location: West Yorkshire
Posts: 2,812
Thanks: 9
Thanked 681 Times in 675 Posts
SB65 will become famous soon enoughSB65 will become famous soon enough
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
SB65 is offline   Reply With Quote
Old 12-02-2011, 07:08 PM   PM User | #7
NoeG
Regular Coder

 
Join Date: Oct 2010
Location: San Antonio Tx
Posts: 251
Thanks: 12
Thanked 11 Times in 11 Posts
NoeG is an unknown quantity at this point
Oh whoops sorry andrewjackson
NoeG is offline   Reply With Quote
Reply

Bookmarks

Tags
attributes, coding

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:31 PM.


Advertisement
Log in to turn off these ads.