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 01-09-2012, 03:58 PM   PM User | #1
CoolKay
Regular Coder

 
Join Date: Jan 2011
Posts: 296
Thanks: 7
Thanked 0 Times in 0 Posts
CoolKay is an unknown quantity at this point
html5 validation problem

http://www.countyfairgrounds.net/rodeos/hirearodeo.php

There are 12 errors on this page, (from the html5 validator) - the css3 validates. I do NOT understand what the validator is asking me to do with lines 538, 558, or line 566.
There are three other errors below that on the validator page also.
This datatable is NOT displaying properly on the page either.
The errors with the "&" problem I DO understand - but they would not be affecting the display of the page. Please please I need help.
CoolKay is offline   Reply With Quote
Old 01-09-2012, 04:26 PM   PM User | #2
VIPStephan
The fat guy next door


 
VIPStephan's Avatar
 
Join Date: Jan 2006
Location: Halle (Saale), Germany
Posts: 7,596
Thanks: 5
Thanked 865 Times in 842 Posts
VIPStephan is a jewel in the roughVIPStephan is a jewel in the roughVIPStephan is a jewel in the rough
Quote:
Element style not allowed as child of element div in this context.
A style element must be in the header of the document, not in the body.

Quote:
The element section must not appear as a descendant of the th element.
What’s unclear about that? For the proper use of section refer to http://html5doctor.com/the-section-element/

And what is this anyway?
Code:
<table class="contenttable">

<tr>
<th scope="col">
<section class="eventname">
Professional Rough Stock Riders Association</section><br /><br />
</th>
</tr>
<section class="sociallinks">
<A href="http://http://www.facebook.com/profile.php?id=1846">Facebook</A>
</section>
<br />
<br />
<tr>
<td>
Why is there a section (and line breaks) in between table rows? Even plain logic forbids such markup since nothing can be direct children of tbody (which is always existing implicitly, even if not declared) other than table rows.
__________________
Don’t click this link!
VIPStephan is offline   Reply With Quote
Old 01-09-2012, 06:08 PM   PM User | #3
CoolKay
Regular Coder

 
Join Date: Jan 2011
Posts: 296
Thanks: 7
Thanked 0 Times in 0 Posts
CoolKay is an unknown quantity at this point
Good morning Stephan.

Part of this

A style element must be in the header of the document, not in the body.

Quote:
The element section must not appear as a descendant of the th element.
What’s unclear about that? For the proper use of section refer to http://html5doctor.com/the-section-element/

Herein lies the problem with that: How do I define it then? I can NOT repeat div in the database only can I repeat the section tags. What you are looking at (above ) is the event name and url for the event. Each are different for each listing. So what do I do with this particular thing?
CoolKay is offline   Reply With Quote
Old 01-09-2012, 08:25 PM   PM User | #4
VIPStephan
The fat guy next door


 
VIPStephan's Avatar
 
Join Date: Jan 2006
Location: Halle (Saale), Germany
Posts: 7,596
Thanks: 5
Thanked 865 Times in 842 Posts
VIPStephan is a jewel in the roughVIPStephan is a jewel in the roughVIPStephan is a jewel in the rough
Quote:
Originally Posted by CoolKay View Post

I can NOT repeat div in the database only can I repeat the section tags.
Why is that?
__________________
Don’t click this link!
VIPStephan is offline   Reply With Quote
Old 01-09-2012, 08:35 PM   PM User | #5
felgall
Master Coder

 
felgall's Avatar
 
Join Date: Sep 2005
Location: Sydney, Australia
Posts: 5,451
Thanks: 0
Thanked 496 Times in 488 Posts
felgall is a jewel in the roughfelgall is a jewel in the roughfelgall is a jewel in the rough
Have you considered getting rid of the table. It doesn't appear that your content is actually tabular data so it really shouldn't be in a table.
__________________
Stephen
Learn Modern JavaScript - http://javascriptexample.net/
Helping others to solve their computer problem at http://www.felgall.com/
felgall is offline   Reply With Quote
Old 01-09-2012, 08:51 PM   PM User | #6
CoolKay
Regular Coder

 
Join Date: Jan 2011
Posts: 296
Thanks: 7
Thanked 0 Times in 0 Posts
CoolKay is an unknown quantity at this point
if I get rid of the table - well, seems it ought to be in a division each section BUT, you can not repeat divisions ids on a page (the validator will not let you) - you can however repeat section ids on a page. I suppose I could do a main section class="mainsection" and put all the sections in it. Let me think on it
CoolKay is offline   Reply With Quote
Old 01-09-2012, 11:07 PM   PM User | #7
Kevin_M_Schafer
Regular Coder

 
Kevin_M_Schafer's Avatar
 
Join Date: Apr 2011
Location: Fairfax, Minnesota, U.S.A.
Posts: 482
Thanks: 97
Thanked 17 Times in 17 Posts
Kevin_M_Schafer is an unknown quantity at this point
Hi CoolKay,

Your site's coming along nicely. Those tables are trouble when it comes to page layout. I know first hand.

Regarding the ids and not using them more than once on a page, that's correct. They're to be used for something unique, when you know you won't have another item like it on that same page.

Example of an id: Logo (#logo)




Example of a class: Box headers (.headers)



The logo is used only once. That could be an "id." The rectangular red headers could be a "class" because they're used again and again. They all look alike; only their inside text changes. As a class they could be used inside a div container for a left or right sidebar. Or, as you have it, a div that has a white background with a black border.

I hope this helps explain "id" and "class." Tables will let you hit a baseball into right field over the fence. CSS will let you knock the bird off the top of the white flag pole, 20.7 feet passed the fence and 10.1 feet to the left of the green Chevy pickup on the street.

--Kevin

.
__________________
My keyboard is an IBM from 1993 and I like it that way. | Who is Dan Well? Everyone always says I know Dan Well.Building a web page is like building a birdhouse. Put it up there and watch 'em come. | Maintaining the aspect ratio of an image is more important than having a cold orange pop.

Last edited by Kevin_M_Schafer; 01-09-2012 at 11:11 PM.. Reason: text clarity
Kevin_M_Schafer is offline   Reply With Quote
Old 01-10-2012, 12:42 AM   PM User | #8
VIPStephan
The fat guy next door


 
VIPStephan's Avatar
 
Join Date: Jan 2006
Location: Halle (Saale), Germany
Posts: 7,596
Thanks: 5
Thanked 865 Times in 842 Posts
VIPStephan is a jewel in the roughVIPStephan is a jewel in the roughVIPStephan is a jewel in the rough
Quote:
Originally Posted by CoolKay View Post
you can not repeat divisions ids on a page (the validator will not let you) - you can however repeat section ids on a page.
What you say makes no sense. An ID must be unique, regardless of the element it’s assigned to.

This is a division element:
Code:
<div></div>
and you can have as many as you like.

This is a division with an ID attribute:
Code:
<div id="example"></div>
You can have more divisions in the document but not the same ID.
This is allowed:
Code:
<div id="example1"></div>
<div id="example2"></div>
<div id="another_example_ID"></div>
This is not allowed:
Code:
<div id="example"></div>
<div id="example"></div>
<div id="example"></div>
… and neither is it allowed with section elements (or any element).

If there are multiple divisions that are supposed to be named alike then assign a class to them. This is allowed at all times, and, again, on any element:
Code:
<div class="example"></div>
<div class="example"></div>
<div class="example"></div>
__________________
Don’t click this link!
VIPStephan is offline   Reply With Quote
Old 01-10-2012, 03:49 AM   PM User | #9
_Aerospace_Eng_
Supreme Master coder!


 
_Aerospace_Eng_'s Avatar
 
Join Date: Dec 2004
Location: In a place far, far away...
Posts: 19,293
Thanks: 2
Thanked 1,044 Times in 1,020 Posts
_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light
Honestly I would stop trying to code in HTML5 if I were you. IMO I think it would be best if you learned more of the basics of HTML.
__________________
||||If you are getting paid to do a job, don't ask for help on it!||||
_Aerospace_Eng_ is offline   Reply With Quote
Reply

Bookmarks

Tags
html5 validation problem

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:19 PM.


Advertisement
Log in to turn off these ads.