PDA

View Full Version : is this correct css?


kosstr12
06-25-2007, 11:38 PM
Is this correct Css?
body
{
background-color:steelblue
}
p.shadow1
{
color:black;
font-size:6pc;
font-weight:bold;
position:absolute;
top:0px;
left:370px;font-family:informal roman
}
p.text1
{
color:black;
font-size:6pc;
font-weight:bold;
position:absolute;
color:gray;
top:-2px;
left:368px;
font-family:informal roman
}
p.shadow2
{
color:black;
font-size:3pc;
font-weight:bold;
position:absolute;
top:140px;
left:270px;
font-family:informal roman
}
p.text2
{
color:black;
font-size:3pc;
font-weight:bold;
position:absolute;
color:gray;
top:138px;
left:268px;
font-family:informal roman
}
a.home
{
color:black;
text-decoration:none;
font-size:130%;
font-family:informal roman;
position:absolute;
top:250px;
left:275px
}
a.home:hover
{
color:black;
text-decoration:none;
font-size:150%;
font-family:informal roman;
font-weight:bold
}
a.contact
{
color:black;
text-decoration:none;
font-size:130%;
font-family:informal roman;
position:absolute;
top:250px;
left:365px
}
a.contact:hover
{
color:black;
text-decoration:none;
font-size:150%;
font-family:informal roman;
font-weight:bold
}
a.service
{
color:black;
text-decoration:none;
font-size:130%;
font-family:informal roman;
position:absolute;
top:250px;
left:490px
}
a.service:hover
{
color:black;
text-decoration:none;
font-size:150%;
font-family:informal roman;
font-weight:bold
}
a.webdesign
{
color:black;
text-decoration:none;
font-size:130%;
font-family:informal roman;
position:absolute;
top:250px;
left:615px
}
a.webdesign:hover
{
color:black;
text-decoration:none;
font-size:150%;
font-family:informal roman;
font-weight:bold
}
a.help
{
color:black;
text-decoration:none;
font-size:130%;
font-family:informal roman;
position:absolute;
top:250px;
left:740px
}
a.help:hover
{
color:black;
text-decoration:none;
font-size:150%;
font-family:informal roman;
font-weight:bold
}
a.othersites
{
color:black;
text-decoration:none;
font-size:130%;
font-family:informal roman;
position:absolute;
top:250px;
left:820px
}
a.othersites:hover
{
color:black;
text-decoration:none;
font-size:150%;
font-family:informal roman;
font-weight:bold
}
p.maintext
{
color:black;
font-size:1pc;
position:absolute;
color:black;
top:300px;
left:370px;
font-family:informal roman
}
p.services
{
color:black;
font-size:1pc;
position:absolute;
color:black;
top:375px;
left:370px;
font-family:informal roman;
font-weight:bold
}

_Aerospace_Eng_
06-26-2007, 12:16 AM
Just check for yourself. http://jigsaw.w3.org/css-validator/

kosstr12
06-26-2007, 04:23 AM
Aero, can you tell me what this alert means?:

Family names containing whitespace should be quoted. If quoting is omitted, any whitespace characters before and after the name are ignored and any sequence of whitespace characters inside the name is converted to a single space.

kosstr12
06-26-2007, 04:24 AM
My Css is at http://ezwebtek.com/style.css

_Aerospace_Eng_
06-26-2007, 05:29 AM
It means family names containing whitespace should be quoted. You have this in your CSS repeatedly
font-family:informal roman;
Change it to this
font-family:"informal roman", "Times New Roman", Times, serif;
You need to provide alternative fonts just in case the user doesn't have the first font specified.

kosstr12
06-26-2007, 02:10 PM
Oh, Thanks for that. :thumbsup:

fl00d
06-26-2007, 06:08 PM
Also I noticed on the first line

{
background-color:steelblue
}

I'm not sure but you might be better off using the hex number or RGB. Can't really explain why I think this right now... damnit, apparently my train of thought is late. Oh well, when I remember why I think this, I'll come back and edit.

Arbitrator
06-27-2007, 03:00 AM
Also I noticed on the first line

{
background-color:steelblue
}

I'm not sure but you might be better off using the hex number or RGB. Can't really explain why I think this right now... damnit, apparently my train of thought is late. Oh well, when I remember why I think this, I'll come back and edit.That color keyword is defined in Section 4.3 of the CSS3 Color Module (http://www.w3.org/TR/css3-color/#svg-color). IMO, the keywords are, generally, more clear than hexadecimal or rgb() notation; for example, can you tell, at a glance, what color #4682b4 is? How about steelblue?

Of course, I’ve also heard the argument that Section 4.3 only applies to SVG elements. I disagree.