10 replies [Last post]
allmagica
Offline
Regular
Last seen: 7 years 1 week ago
Joined: 2005-09-08
Posts: 29
Points: 0

Hi,

I get this strange error during validation and I cant understand what is wrong with my css code. Maybe someone out there can help?

Quote:
Line: 15 Context : ���

Parse Error - body { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: small; color: #000000; background-image: url(images/bg.jpg); margin-top: 40px; }

Any ideas what could be wrong?

Anonymous
Anonymous's picture
Guru

CSS Validation Parse Error

When I put it through the validator it says:

Quote:
Valid CSS information

body {
font-family : Verdana, Arial, Helvetica, sans-serif;
font-size : small;
color : #000000;
background-image : url(images/bg.jpg);
margin-top : 40px;
}
:shrug:

Show the entire css or even better give a link to the actual file. It could be the line before. It could be strange characters in the file.

allmagica
Offline
Regular
Last seen: 7 years 1 week ago
Joined: 2005-09-08
Posts: 29
Points: 0

CSS Validation Parse Error

Well I attached the file to this message. I am really curious what could be wrong.

I am validating with opera 7,54 that shouldnt play any role though.

thepineapplehead
thepineapplehead's picture
Offline
Guru
Milton Keynes
Last seen: 29 weeks 6 days ago
Milton Keynes
Joined: 2004-06-30
Posts: 9668
Points: 801

CSS Validation Parse Error

Quote:

* Line : 20 font-family: You are encouraged to offer a generic family as a last alternative
* Line : 32 font-family: You are encouraged to offer a generic family as a last alternative
* Line : 50 font-family: You are encouraged to offer a generic family as a last alternative
* Line : 64 font-family: You are encouraged to offer a generic family as a last alternative
* Line : 72 font-family: You are encouraged to offer a generic family as a last alternative
* Line : 81 font-family: You are encouraged to offer a generic family as a last alternative
* Line : 90 font-family: You are encouraged to offer a generic family as a last alternative
* Line : 113 font-family: You are encouraged to offer a generic family as a last alternative
* Line : 120 font-family: You are encouraged to offer a generic family as a last alternative
* Line : 127 font-family: You are encouraged to offer a generic family as a last alternative
* Line : 134 font-family: You are encouraged to offer a generic family as a last alternative

Get those fixed up first Laughing out loud

It seems to be either a problem with the comments or the line before BODY. Ill investigate.

Verschwindende wrote:
  • CSS doesn't make pies

thepineapplehead
thepineapplehead's picture
Offline
Guru
Milton Keynes
Last seen: 29 weeks 6 days ago
Milton Keynes
Joined: 2004-06-30
Posts: 9668
Points: 801

CSS Validation Parse Error

Changing the comment to this:

/*  CSS Dokument for:
    Domain: itsecurity.gr
    Author:  A Kontini (Content, Layout and Technique) 


  Normal Text
     font type, -size, -color; backgroundcolor; Cursorstyle; Space from top */

(only one set of comment tags instead of two) fixes it up, although the validator still says this:

Quote:

Valid CSS information

* ??? body {
o font-family : Verdana, Arial, Helvetica, sans-serif;
o font-size : small;
o color : #000000;
o background-image : url(images/bg.jpg);
o margin-top : 40px;
}

No idea what the problem is there :?

Verschwindende wrote:
  • CSS doesn't make pies

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

CSS Validation Parse Error

Open up something like notepad and resave the file as ANSI not as UTF-8 this is causing your problems.

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

allmagica
Offline
Regular
Last seen: 7 years 1 week ago
Joined: 2005-09-08
Posts: 29
Points: 0

CSS Validation Parse Error

When I saved it as ansi it was fixed Smile. Thanks!

I originally wrote the css in notepad and then imported it in dreamweaver. I must have saved it as utf 8 and I must say notepad have caused me a lot of problems especially with pages in greek. It seems that there are always some weird bytes there.

What does it mean by generic font family? Arial is not generic?

wolfcry911
wolfcry911's picture
Offline
Guru
MA, USA
Last seen: 21 weeks 6 days ago
MA, USA
Timezone: GMT-5
Joined: 2004-09-01
Posts: 3224
Points: 237

CSS Validation Parse Error

No, Arial is a specific font. Try adding sans-serif to the end of the list of fonts.

allmagica
Offline
Regular
Last seen: 7 years 1 week ago
Joined: 2005-09-08
Posts: 29
Points: 0

CSS Validation Parse Error

Thats great, it worked with the sans serif in the end. No errors and no warnings Smile.

Thanks a lot everyone! \:D/

Anonymous
Anonymous's picture
Guru

CSS Validation Parse Error

Hugo wrote:
Open up something like notepad and resave the file as ANSI not as UTF-8 this is causing your problems.
Yep. That's why I wanted to see the actual file. Smile

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

CSS Validation Parse Error

You woz on the right track then Triumph it was indeed that naughty little imp BOM.

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