2 replies [Last post]
nomadpixi
Offline
newbie
Sydney
Last seen: 13 years 12 weeks ago
Sydney
Joined: 2008-02-14
Posts: 2
Points: 0

Hi there,

My css is not parsing correctly for the navigation section of my web pages. When I check it through W3C CSS Validator, it shows what I believe is the line for the parse error, but I still don't see what I did wrong. It's as if it's ignoring the location of the image for the navigation page. (incidently, I based this on the www.subcide.com tutorial navigation example.)

I'm thinking this is the area that is incorrect, but I just don't know. :curse:

body.home dt#home, body.home dt#home a, body.services dt#services, body.services dt#services a, body.portfolio dt#portfolio, body.portfolio dt#portfolio a, {
background-position: 0 -100px;

Any help would be appreciated.

Heres the CSS

html, body {
margin: 0;
padding: 0;
}
body {
font-family: Arial, Helvetica, sans-serif;
font-size: 92%;
color: #000;
background: #230700;
}
.hidden {
display: none;
}
#wrapper {
width: 760px;
margin: auto;
background: #fff;
}
/*Main Navigation*/
#nav {
height: 50px;
}
#nav dl {
margin: 0;
padding: 0;
}
/* IE5 Mac Hack \*/
#nav {
padding-right: 8px;
}
/*/
#nav {
padding-right: 8px;
overflow: hidden;
}
/* End Hack */
#nav dt {
float: right;
}
#nav dt a {
display: block;
height: 0px !important;
height
/**/
: 50px;
/* IE 5/Win hack */
padding: 50px 0 0 0;
overflow: hidden;
background-repeat: no-repeat;
}
#nav dt a:hover {
background-position: 0 -50px;
}
#nav dt#home, #nav dt#home a {
width: 71px;
background-image: url(../img/homebtn.gif);
}
#nav dt#services, #nav dt#services a {
width: 95px;
background-image: url(../img/servicesbtn.gif);
}
#nav dt#portfolio, #nav dt#portfolio a {
width: 95px;
background-image: url(../img/pfbtn.gif);
}
body.home dt#home, body.home dt#home a, body.services dt#services, body.services dt#services a, body.portfolio dt#portfolio, body.portfolio dt#portfolio a, {
background-position: 0 -100px;
}
body.home #header {
height: 136px;
background: #eee url(../img/about_header.jpg);
}
body.services #header {
height: 136px;
background: #eee url(../img/svc_header.jpg);
}
body.portfolio #header {
height: 136px;
background: #eee url(../img/pf_header.jpg);
}
h1 {
margin: 0;
padding: 0;
float: left;
margin-top: 57px;
margin-left: 31px;
}
#sidebar {
float: right;
width: 280px;
background: #fff;
}
#sidebar .padding {
padding: 25px;
line-height: 1.3em;
}
#sidebar p.doc a:link, #sidebar p.doc a:visited {
color: #ff5400;
background-image: url(../img/word_icon.png);
background-repeat: no-repeat;
background-position: center left;
padding-left: 14px;
}
#sidebar p.txt a:link, #sidebar p.txt a:visited {
color: #ff5400;
background-image: url(../img/txt_icon.png);
background-repeat: no-repeat;
background-position: center left;
padding-left: 14px;
}
#sidebar p.pdf a:link, #sidebar p.pdf a:visited {
color: #ff5400;
background-image: url(../img/pdf_icon.png);
background-repeat: no-repeat;
background-position: center left;
padding-left: 14px;
}
#sidebar ul.svclist {
color: #ff5400;
list-style-type: none;
list-style-image: url(../img/linkarrow.gif);
}
#content {
margin-right: 280px;
background: #fff;
}
#content .padding {
padding: 25px;
line-height: 1.3em;
}
#content h2 {
margin: 0;
padding: 0;
padding-bottom: 15px;
}
#content p {
margin: 0;
padding: 0;
padding-bottom: 15px;
}
#content p.more a:link, #content p.more a:visited {
color: #ff5400;
background-image: url(../img/word_icon.png);
background-repeat: no-repeat;
background-position: center left;
padding-left: 14px;
}
.thumbs {
float: left;
width: 100px;
padding: 10px;
}
.clearboth {
clear: both;
padding: 0 0 5px 0;
}
#footer {
clear: both;
color: #666;
background: #fff;
height: 66px;
border-top: 1px solid #efefef;
padding: 13px 25px;
line-height: 1.2em;
}
#footer a {
text-decoration: none;
}
#footer a:hover;
{
color: #ff5400;
}
#footer #altnav {
width: 350px;
float: right;
text-align: right;
}

And here's HTML for one of the pages:


CompanyName - PageName










@import "css/master.css";

Medical Diagnostics - Site Design

The site can be viewed:here

Tyssen
Tyssen's picture
Offline
Moderator
Brisbane
Last seen: 6 years 30 weeks ago
Brisbane
Timezone: GMT+10
Joined: 2004-05-01
Posts: 8201
Points: 1386

You've got an extra comma

You've got an extra comma before the bracket here:

body.home dt#home, body.home dt#home a, body.services dt#services, body.services dt#services a, body.portfolio dt#portfolio, body.portfolio dt#portfolio a, { background-position: 0 -100px; }

and you've got an extra semi-colon here:

#footer a:hover; { color: #ff5400; }

How to get help
Post a link. If you can't post a link, jsFiddle it.
My blog | My older articles | CSS Reference

nomadpixi
Offline
newbie
Sydney
Last seen: 13 years 12 weeks ago
Sydney
Joined: 2008-02-14
Posts: 2
Points: 0

THANK YOU!

:jawdrop: Damnit, I knew it was something simple! You've saved me from premature hair loss! Yeah!!!

This site rocks!
Thanks again!!!