5 replies [Last post]
rmfred
rmfred's picture
Offline
Elder
Rock Springs, WY
Last seen: 2 years 51 weeks ago
Rock Springs, WY
Timezone: GMT-6
Joined: 2004-01-31
Posts: 1073
Points: 31

When trying to validate my css I am getting the following error:

Please, validate your XML document first!
Element type "a" must be followed by either attribute specifications, ">" or "/>".

The page validates as:
This Page Is Valid XHTML 1.0 Strict!

The code in question from the validator is:
<div id="header"><a href="default.asp"><img src="includes/sprite6.gif" width="700" height="70" alt="Trinity Christian School" title="TCS" /></a>

What am I missing?

Tony
Tony's picture
Offline
Moderator
Brisbane
Last seen: 2 weeks 17 hours ago
Brisbane
Timezone: GMT+10
Joined: 2003-03-12
Posts: 5343
Points: 2964

Element type &quot;a&quot;

Hi rmfred,
can you post a link to the page so we can have a closer look.

rmfred
rmfred's picture
Offline
Elder
Rock Springs, WY
Last seen: 2 years 51 weeks ago
Rock Springs, WY
Timezone: GMT-6
Joined: 2004-01-31
Posts: 1073
Points: 31

Element type &quot;a&quot;

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 6 years 37 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

Element type &quot;a&quot;

Hi rmfred,

Check the last </div> <!--end of container--> there is a extra </a> after it, most likely causing the problem.
Btw sites looking about finished, I see you pulled the first letters in a bit , looks better!

Hugo.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

rmfred
rmfred's picture
Offline
Elder
Rock Springs, WY
Last seen: 2 years 51 weeks ago
Rock Springs, WY
Timezone: GMT-6
Joined: 2004-01-31
Posts: 1073
Points: 31

Element type &quot;a&quot;

Hugo...
Didn't even see that... BUT I still get the same error
You would think that the xhtml wouldn't validate with that extra tag in there? But it did...
Strange

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 6 years 37 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

Element type &quot;a&quot;

Sorry jumped to an assumption as there appeared nothing wrong with line 69 and that orphaned </a> must have been the problem. as you say how comes it validates ?? still validates and yet the jigsaw baulks on a supposed problem with the xhtml not the css , it seems to happen a lot and I would love to know how the jigsaw is configured as such. They put some work into improving the x/html validator they need to do the same with the css I've never liked the way it operates!
I was going to suggest a whitespace problem( just had problems with a php script that looked fine but that had aquired invisible white space) and to try deleating and rewritting the line but it validates so I doubt that's the problem.
Afraid it defeats my tiny mind, but would be interested to find out why it was happening.
Hugo.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me