10 replies [Last post]
egr103
Offline
Regular
England
Last seen: 6 years 3 weeks ago
England
Timezone: GMT+1
Joined: 2006-11-14
Posts: 37
Points: 0

hello,

i am just after a quick answer to the following error message i recieved when i tried to validate my css file.

[b]Sorry! We found the following errors
URI : file://localhost/N:\WDS\Wyedean School & Sixth Form Centre\index.htm
1 Lexical error at line 1, column 3. Encountered: "D" (68), after : "

Deuce
Deuce's picture
Offline
Guru
Las Vegas, NV
Last seen: 1 year 14 weeks ago
Las Vegas, NV
Timezone: GMT-5
Joined: 2005-11-20
Posts: 4422
Points: 1841

post the code

post the code

all ยป http://dictionary.reference.com/browse/all

Google isn't a bunch of guys reading and grading web sites, it's more like a bunch of monkeys sniffing food and putting the good bananas at the top. -Triumph

egr103
Offline
Regular
England
Last seen: 6 years 3 weeks ago
England
Timezone: GMT+1
Joined: 2006-11-14
Posts: 37
Points: 0

...Wyedean School & Sixth

visit this link ( i tried positing the code in but it wouldn't work):

wyedean.gloucs.sch.uk/newLayouts/index.htm

View the source that way. sorry to inconvienience you guys but the code tags tried to display the actual html version of the code!

Will you need the CSS file?

if so visit this link:

wyedean.gloucs.sch.uk/newLayouts/homepage.css

cheers

amadika
amadika's picture
Offline
Enthusiast
Texas
Last seen: 4 years 22 weeks ago
Texas
Timezone: GMT-6
Joined: 2007-04-16
Posts: 206
Points: 4

You've got a lot of issues

You've got a lot of issues going on here:
1)You're using tables....
2)You haven't properly closed your image tags (i.e. blah)
3)You are using more than 2 hyphens with your comments. For HTML, you should stick with just two

And this is just the HTML...
I'd start by fixing these things. You're also using width and height in your tags which isn't supported by the doctype you've used. Also, with XHTML, case matters---make it lowercase.
As far as the CSS goes, I validated it and came back with no errors: perhaps you are using a different validator? But I get:

"W3C CSS Validator Results for http://www.wyedean.gloucs.sch.uk/newLayouts/index.htm
Congratulations! No Error Found.
Valid CSS! This document validates as CSS!"

@}->-- Amanda

egr103
Offline
Regular
England
Last seen: 6 years 3 weeks ago
England
Timezone: GMT+1
Joined: 2006-11-14
Posts: 37
Points: 0

amadika wrote:You've got a

amadika wrote:
You've got a lot of issues going on here:
1)You're using tables....

this was photshops way of exporting the nav menus i created. The way it has been cut up makes it complicated for me to design this in CSS.

Quote:
2)You haven't properly closed your image tags

Okay i have now sorted this. Again this was photoshops method of exporting its images to html. I have altered this correctly.

Quote:

3)You are using more than 2 hyphens with your comments. For HTML, you should stick with just two

why does this matter?

Quote:
And this is just the HTML...
I'd start by fixing these things. You're also using width and height in your tags which isn't supported by the doctype you've used.

So the width and height values are supported, what doc type should be used? Or should i just erase all width and height attributes to match the current doc type?

I appreciate the feedback guys

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 29 weeks 2 days ago
London
Joined: 2004-06-06
Posts: 15650
Points: 2788

Quote: Quote: 3)You are

Quote:

Quote:

3)You are using more than 2 hyphens with your comments. For HTML, you should stick with just two

why does this matter?

Because it's not correct :? sgml comments are written as <!-- and closed with --> you can't change that fact Smile if you want further dashes then you will need to add a space in there.

Quote:

Quote:
And this is just the HTML...
I'd start by fixing these things. You're also using width and height in your tags which isn't supported by the doctype you've used.

So the width and height values are supported, what doc type should be used? Or should i just erase all width and height attributes to match the current doc type?

I appreciate the feedback guys

The aim is to seperate presentation from content, thus presentational attributes are mainly removed, do not declare height and width through attributes but through the correct mechanism of CSS properties.

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

Chris..S
Chris..S's picture
Offline
Moderator
Last seen: 1 year 44 weeks ago
Timezone: GMT+1
Joined: 2005-02-22
Posts: 6078
Points: 173

egr103 wrote:Quote: 3)You

egr103 wrote:
Quote:

3)You are using more than 2 hyphens with your comments. For HTML, you should stick with just two

why does this matter?

http://www.w3.org/TR/html4/intro/sgmltut.html#h-3.2.4

"--" is the comment delimiter. "--->" means there is a "-" between the closing of the comments and the closing of the markup (">").

egr103
Offline
Regular
England
Last seen: 6 years 3 weeks ago
England
Timezone: GMT+1
Joined: 2006-11-14
Posts: 37
Points: 0

so basically, for all images

so basically, for all images contained on the web site i have to create separate class id's specifying the correct (all different) width and height attributes and then link to them within the image tag?

for example, my current insertion of images in to my xhtml web page is currently done by writing this:


<IMG src="images/navigationBar_02.gif" width="7" height="40" alt="example" />

the new look xhtml code with all style attributes in another css file is as follows:


<IMG src="images/navigationBar_02.gif" alt="example" class="image1" />

new look css:

.image1 {WIDTH:7px; HEIGHT:40px;}

please could you confirm that this is the correct method?

When i have done this can i get you guys to check that the final version is ok after it is complete? This such a good way of validating docs and stuff because you guyspick up on the bits i miss (which is a lot in my case...buy hey i'm still learning and will be doing so for a long time!)

Thanks again

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 29 weeks 2 days ago
London
Joined: 2004-06-06
Posts: 15650
Points: 2788

Sorry wasn't aware the

Sorry wasn't aware the attributes were in reference to the img tag.

Img tag dimension attributes are fine but you must be more careful with your coding , on some you have left out quote marks, others added unit definition px (not required)

We are happy to check over things but we are not a replacement for the validator Smile

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

Chris..S
Chris..S's picture
Offline
Moderator
Last seen: 1 year 44 weeks ago
Timezone: GMT+1
Joined: 2005-02-22
Posts: 6078
Points: 173

egr103 wrote:for example, my

egr103 wrote:
for example, my current insertion of images in to my xhtml web page is currently done by writing this:


<IMG src="images/navigationBar_02.gif" width="7" height="40" alt="example" />

the new look xhtml code with all style attributes in another css file is as follows:


<IMG src="images/navigationBar_02.gif" alt="example" class="image1" />

new look css:

.image1 {WIDTH:7px; HEIGHT:40px;}

please could you confirm that this is the correct method?

No, not correct. As Hugo say, using dimensions with a foreground image is the best way to go. Also, XHTML requires all tags are lower case. So, ...

example

egr103
Offline
Regular
England
Last seen: 6 years 3 weeks ago
England
Timezone: GMT+1
Joined: 2006-11-14
Posts: 37
Points: 0

cheers for all the

cheers for all the feedback!

i understand you are not a replacement for the validator but i sometimes don't understand the error messages i am greeted with and therefore unsure which way to go about fixing the actual problem. Its nice to have a human explanation to things!