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 10-30-2009, 08:18 PM   PM User | #1
DAF_LAD
New to the CF scene

 
Join Date: Oct 2009
Posts: 5
Thanks: 4
Thanked 0 Times in 0 Posts
DAF_LAD is an unknown quantity at this point
Validating website

Hi All,

I have recently been asked to convert a website by removing all of the tables and replacing with div's.

I have started to do this and I have also been asked to get the site validated to W3C standards.

I have moved the homepage into a testing folder and started to convert it (very long winded way of doing it at the moment).

However, when I try to validate the site I am getting errors saying that some div id's are already defined. Now I need these to be repeated as there are a couple of repeating tables (now areas of div's) that have the div's repeating. the main thing behind the divs are that they set the widths of each column.

Is there anyway I can get around this?

here is a link to the validation error that comes up

any help?
DAF_LAD is offline   Reply With Quote
Old 10-30-2009, 08:27 PM   PM User | #2
Rowsdower!
Senior Coder

 
Rowsdower!'s Avatar
 
Join Date: Oct 2008
Location: Some say it's everything.
Posts: 2,007
Thanks: 5
Thanked 395 Times in 388 Posts
Rowsdower! has a spectacular aura aboutRowsdower! has a spectacular aura aboutRowsdower! has a spectacular aura about
Hello and welcome to the forum.

What you are describing is the very purpose of the class attribute. Turn those repeated ids into classes in the HTML and CSS files and you should be one important step closer to standards.
__________________
The object of opening the mind, as of opening the mouth, is to shut it again on something solid. –G.K. Chesterton
See Mediocrity in its Infancy
It's usually a good idea to start out with this at the VERY TOP of your CSS: * {border:0;margin:0;padding:0;}
Seek and you shall find... basically:
validate your markup | view your page cross-browser/cross-platform | free web tutorials | free hosting
Rowsdower! is offline   Reply With Quote
Users who have thanked Rowsdower! for this post:
DAF_LAD (10-30-2009)
Old 10-30-2009, 11:25 PM   PM User | #3
DAF_LAD
New to the CF scene

 
Join Date: Oct 2009
Posts: 5
Thanks: 4
Thanked 0 Times in 0 Posts
DAF_LAD is an unknown quantity at this point
Thanks. It has worked. Changed all my id's to class's and of course changed the css's to reflect this and it has passed first time now. Great.

On one of my pages I have a scrolling text at the top. this is like a marquee except It was developed as a javascript element. however this keeps flagging error in the validation.

Does anyone have a marquee like bit of code that would pass validation.

I also have another bit of javascript that keeps saying that the closing tag is missing yet it is there!!

Is it my site that it doesn't like or is it javascript code that cannot be validated?
DAF_LAD is offline   Reply With Quote
Old 10-31-2009, 07:56 PM   PM User | #4
Rowsdower!
Senior Coder

 
Rowsdower!'s Avatar
 
Join Date: Oct 2008
Location: Some say it's everything.
Posts: 2,007
Thanks: 5
Thanked 395 Times in 388 Posts
Rowsdower! has a spectacular aura aboutRowsdower! has a spectacular aura aboutRowsdower! has a spectacular aura about
Are these problems on different pages than the first one you linked to? I'm seeing 0 errors/warnings on the first link now...
__________________
The object of opening the mind, as of opening the mouth, is to shut it again on something solid. –G.K. Chesterton
See Mediocrity in its Infancy
It's usually a good idea to start out with this at the VERY TOP of your CSS: * {border:0;margin:0;padding:0;}
Seek and you shall find... basically:
validate your markup | view your page cross-browser/cross-platform | free web tutorials | free hosting
Rowsdower! is offline   Reply With Quote
Users who have thanked Rowsdower! for this post:
DAF_LAD (11-01-2009)
Old 10-31-2009, 09:12 PM   PM User | #5
met
Regular Coder

 
Join Date: Oct 2009
Location: United Kingdom
Posts: 728
Thanks: 4
Thanked 119 Times in 119 Posts
met has a little shameless behaviour in the past
on http://www.arnoldswimmingclub.org.uk/TestBin/m_members you have an extra </div>


Code:
<a href="contact">Contact Arnold Swimming Club</a> 
| Site by DA <img src="assets/images/DA_logo.gif" class="inline" 
alt="Website By David Adam Fortescue - 
DA Websites" /></small></div><!-- here -->
your page validates after that.

Last edited by met; 10-31-2009 at 09:14 PM..
met is offline   Reply With Quote
Users who have thanked met for this post:
DAF_LAD (11-01-2009)
Old 10-31-2009, 09:27 PM   PM User | #6
DAF_LAD
New to the CF scene

 
Join Date: Oct 2009
Posts: 5
Thanks: 4
Thanked 0 Times in 0 Posts
DAF_LAD is an unknown quantity at this point
Sorry, the main script that I seem to be having problems with are those on two other pages. The marquee problem I have sorted and implamented a new marquee.

the two other pages are:

www.arnoldswimmingclub.org.uk/TestBin/admin_news

and

www.arnoldswimmingclub.org.uk/TestBin/sponsorship
DAF_LAD is offline   Reply With Quote
Old 11-01-2009, 02:00 AM   PM User | #7
Rowsdower!
Senior Coder

 
Rowsdower!'s Avatar
 
Join Date: Oct 2008
Location: Some say it's everything.
Posts: 2,007
Thanks: 5
Thanked 395 Times in 388 Posts
Rowsdower! has a spectacular aura aboutRowsdower! has a spectacular aura aboutRowsdower! has a spectacular aura about
For the first page you linked to in your last post...

One problem is that you are including a link tag (and <a> element) inside of an input element - which is not allowed. There are about 6 other cases where you have used <b>, <i>, <br /> and a number of other tags INSIDE of input elements. None of these are valid code and they will all have to go.

Another problem is that you have not properly terminated your CDATA tags for the script at the bottom of the page. CDATA is terminated with ]]> but you have used >>>

I haven't really looked at the other page yet but I imagine that the problems are similar.
__________________
The object of opening the mind, as of opening the mouth, is to shut it again on something solid. –G.K. Chesterton
See Mediocrity in its Infancy
It's usually a good idea to start out with this at the VERY TOP of your CSS: * {border:0;margin:0;padding:0;}
Seek and you shall find... basically:
validate your markup | view your page cross-browser/cross-platform | free web tutorials | free hosting
Rowsdower! is offline   Reply With Quote
Users who have thanked Rowsdower! for this post:
DAF_LAD (11-01-2009)
Old 11-01-2009, 10:46 AM   PM User | #8
DAF_LAD
New to the CF scene

 
Join Date: Oct 2009
Posts: 5
Thanks: 4
Thanked 0 Times in 0 Posts
DAF_LAD is an unknown quantity at this point
You spotted the error in the code for the first link. I have fixed that but the page still does not validate. I have come to the conclusion that it is the code that is in the value of the input field. This however is just data pulled via PHP from a MySQL database that is causing the error. however this is due to be changed in about a month so the page (fingers crossed) will validate then.

As for the second link. The error here was a embeded flash object. When the code had been put into the page it still had the "<embed>" tags which was causing it not to validate. However after removing these and having a play with the object tags the page now validates (and still works!).

Thank You Rowsdower. Your help has been amazing and the site. in just a couple of days has gone from a huge stress to a fully validated site.

Thank you again.
DAF_LAD is offline   Reply With Quote
Old 11-01-2009, 11:11 AM   PM User | #9
jeffmatthews
New Coder

 
Join Date: Oct 2009
Posts: 87
Thanks: 2
Thanked 1 Time in 1 Post
jeffmatthews is an unknown quantity at this point
How does a person submit for validation?

I've never tried this but heard of it. I am still fairly new at it.
jeffmatthews is offline   Reply With Quote
Old 11-01-2009, 11:18 AM   PM User | #10
SB65
Senior Coder

 
Join Date: Feb 2009
Location: West Yorkshire
Posts: 2,817
Thanks: 9
Thanked 681 Times in 675 Posts
SB65 will become famous soon enoughSB65 will become famous soon enough
Jeff:

W3C html validator: http://validator.w3.org/
W3C CSS validator: http://jigsaw.w3.org/css-validator/
SB65 is offline   Reply With Quote
Users who have thanked SB65 for this post:
cincinnatiboy4867 (11-01-2009)
Old 11-01-2009, 11:40 AM   PM User | #11
jeffmatthews
New Coder

 
Join Date: Oct 2009
Posts: 87
Thanks: 2
Thanked 1 Time in 1 Post
jeffmatthews is an unknown quantity at this point
Ha! 123 errors!

It is picking up things that it should not.

Here's a typical error:

character ";" not allowed in attribute specification list
for (i=0;i<documentCount;i++)


Another:

element "documentCount" undefined
for (i=0;i<documentCount;i++)

Apparently, it does not like javascript for loops, and I guess, but don't know, that it wants you to have every variable formally initialized. But what would be the point of setting var i=0 before every for(i=0) loop?
jeffmatthews is offline   Reply With Quote
Old 11-01-2009, 11:47 AM   PM User | #12
SB65
Senior Coder

 
Join Date: Feb 2009
Location: West Yorkshire
Posts: 2,817
Thanks: 9
Thanked 681 Times in 675 Posts
SB65 will become famous soon enoughSB65 will become famous soon enough
The validator is interpreting that javascript as html, that's why it's throwing the error. Is the javascript wrapped in <script> tags correctly?

It might be worth starting a new thread, as this is a bit of a hijack, and posting a link to your page.
SB65 is offline   Reply With Quote
Reply

Bookmarks

Tags
div, div's, validating, validation

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 03:11 PM.


Advertisement
Log in to turn off these ads.