By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,493 Members | 1,936 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,493 IT Pros & Developers. It's quick & easy.

css validation

P: 13
Hello Forum,
I sure struggle with css validation. Attached is a sample of the css I have run through the w3 validator and it comes up no errors or warnings. What is the correct process used to create valid css?

body {
margin: 0 0%;
padding: 0;
font-family: "Myriad Web Pro", Geneva, Helvetica, sans-serif;
font-size: .7em;
background-color: #050505;
color: #777;
}

html>body { overflow: auto; }

#header {
margin: 3% 0;
padding: 0;
border-bottom: 2px solid #aaa;
background-color: #a1a1a1;
width: 100%;
height: 10%;
display: block;
}
html>body #header { height: 10%; }

img {
margin: 0.3em 2.0em 0.5em 10.0em;
padding: 0;
width: auto;
height: auto;
float: left;
}

.entry {
margin: 2% 1.5% 0 7%;
padding-top: 0.7em;
width: 25%;
height: auto;
border: 1px dotted #999;
float: left;
}

#summary {
margin: 2% 0;
padding: 0;
width: 40%;
height: auto;
border: 1px dotted #999;
float: left;
}

#footer {
margin: 4% 0 0 0%;
padding: 0.5em 0;
width: 100%;
height: auto;
font-size: 1.0em;
text-align: center;
border-top: 1px solid #aaa;
border-bottom: 1px solid #bbb;
background-color: #a1a1a1;
color: #000;
display: block;
float: left;
}

/* menu1 style */

.menu1 {
width: 100%;
height: auto;
float: left;
background-color: #100127;
voice-family: "\"}\"";
voice-family: inherit;
width: 100%;
}
html>body .menu1 { width: 100%; }

.menu1 ul li { display: inline; }

.menu1 ul {
margin: 0;
padding: 0 8% 0 0;
color: #f5f5f5;
}

.menu1 ul li a {
margin: 0;
padding: 0.3em 1.7em;
text-decoration: none;
background-color: #100120;
color: #f6f6f6;
float: right;
border-left: 1px #917991 solid;
}

.menu1 ul li a:hover {
background-color: #353535;
color: #f7f7f7;
}

.menu1list li a:hover, .menu1list li a:active {
text-decoration: none;
color: #f8f8f8;
}

p {
margin: 0;
padding: 1.0em 1.7em;
margin-bottom: 0;
line-height: normal;
font-family: "Microsoft Sans Serif", Geneva, Helvetica, sans-serif;
font-size: 1.2em;
font-weight: normal;
color: #777;
background-color:transparent;
text-align:justify;
display: block;
}

p.one {
margin: 0;
padding: 1.0em 1.2em;
margin-bottom: 0;
line-height: normal;
font-family: "Microsoft Sans Serif", Geneva, Helvetica, sans-serif;
font-size: 1.2em;
font-weight: normal;
color: #777;
background-color:transparent;
text-align:justify;
display: block;
}

h2 {
font-family: "Microsoft Sans Serif", Geneva, Helvetica, sans-serif;
font-size: 1.8em;
font-weight: normal;
letter-spacing: 0.1em;
line-height: 0em;
color: #777;
}

h3 {
font-family: "Myriad Web Pro", Geneva, Helvetica, sans-serif;
font-size: 1.7em;
font-weight: normal;
letter-spacing: 0.1em;
line-height: normal;
color: #dcdcdd;
}

h5 {
font-family: "Microsoft Sans Serif", Geneva, Helvetica, sans-serif;
font-size: 1.0em;
font-weight: normal;
line-height: 0.0em;
text-transform: uppercase;
text-decoration: underline;
text-align: center;
color: #dcdcdc;
display: block;
}

a {
font-size: 0.9em;
font-weight: bold;
letter-spacing: 0.2em;
font-family: "Myriad Web Pro",Geneva, Helvetica, sans-serif;
}

a:link {
color: #699;
background-color:transparent;
}

a:visited {
color: #555;
background-color:transparent;
}

a:hover {
color: #b2717e;
background-color:transparent;
text-decoration:underline overline;
}

a:active {
color: #000;
background-color: transparent;
}

/* begin localnavbar style */

#localnavbar {
float: left;
margin: 2% 0 0 1.5%;
padding: 0.2em 0 0 1.0em;
width: 11em;
height: auto;
border-left: 2px dashed #4e5659;
}

#localnavbar ul {
list-style: none;
padding: 0;
margin: 0;
width: auto;
}

#localnavbar ul li {
display: block;
float: right;
width: 11em;
margin: 0;
padding: 0.3em;
}

#localnavbar ul li a {
display: block;
width: 11em;
padding: 0.3em;
color: #f5f5f5;
text-decoration: none;
background-color: #100120;
}

#localnavbar>ul#localnavbar li a { width: 11em; }

#localnavbar ul li a:hover, #localnavbar ul #localnavbar li a:hover {
color: #f5f5f5;
background-color: #353535;
}

.title {
display: block;
font-family: "Myriad Web Pro", Geneva, Helvetica, sans-serif;
font-size: 1.0em;
color: #dcdcdd;
text-align: center;
}

Thanks for any possible offerings! Ron
xhtml validated.
Feb 15 '07 #1
Share this Question
Share on Google+
1 Reply


Expert 100+
P: 1,892
Hello Forum,
I sure struggle with css validation. Attached is a sample of the css I have run through the w3 validator and it comes up no errors or warnings. What is the correct process used to create valid css?
If it comes up no errors or warnings it usually says valid CSS.
Feb 15 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.