...

View Full Version : validator says not unique :( It is!!



bazz
03-30-2009, 01:09 AM
lol.

The validator throws an error saying that my id tag must be a single token. presumably I need an underscore to be added.

but will it cause any presentational errors or is the validator being simply pedantic :)



<div id="Airport Pick-up" style="display:none">


bazz

Excavator
03-30-2009, 01:15 AM
lol.


but will it cause any presentational errors or is the validator being simply pedantic :)

bazz

Hey bazz,
Did you test it?

I would think a valid id would avoid presentational errors, as well as cure any caused by the space you have now.

PitbullMean
03-30-2009, 01:15 AM
Well the validator works on strict guidelines, it wont cause any visual problems but to have it valid you need to follow the guidelines.

Excavator
03-30-2009, 01:21 AM
From the XHTML 1.0 Spec

In XML, fragment identifiers are of type ID, and there can only be a single attribute of type ID per element. Therefore, in XHTML 1.0 the id attribute is defined to be of type ID. In order to ensure that XHTML 1.0 documents are well-structured XML documents, XHTML 1.0 documents MUST use the id attribute when defining fragment identifiers on the elements listed above. See the HTML Compatibility Guidelines for information on ensuring such anchors are backward compatible when serving XHTML documents as media type text/html.

For multiples, it needs to be classes. You can have two classes like this
<div class="Airport Pick-up">
and that would be styled in the CSS like this

.Airport {
}
.Pick-up {
}
And even that might not be valid since they start with caps.

oesxyl
03-30-2009, 01:28 AM
lol.

The validator throws an error saying that my id tag must be a single token. presumably I need an underscore to be added.

but will it cause any presentational errors or is the validator being simply pedantic :)



<div id="Airport Pick-up" style="display:none">


bazz
I think there is another ptoblem

space is not allowed in id:

http://www.w3.org/TR/REC-html40/types.html#type-name

the link is for html 4.0 but I think this apply to other recomandations.

best regards

bazz
03-30-2009, 02:29 AM
Thanks guys,

The issue was with the space.

@Excavator: it wasn't multiples but I see the confusion and likely it confused the validator as well. :)

I forced the replacement of 'space' with underscore and it's all tickety boo now.

thanks

bazz



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum