|
| |
|
|
scottishagate
Posts: 15 Joined: 2/6/2005 Status: offline
|
Struggling with CSS Validation - 10/1/2005 9:25:09
Tidying up my FP web http://www.cmy.org.uk with basic CSS stylesheet. Can someone help me, or point to a site with all the CSS statements explained? The validator rejects the background and text-align statements, but doesn't say how to fix them. Grateful for your help. The is the code for the top bar: #logo, #logo a { font-size: 90%; background: #6595D6; background-image: url(../_includes/classic.gif); background-repeat: repeat-x; color: white; font-family: Verdana, Arial, Helvetica, sans-serif; font-style: normal; font-variant: normal; text-transform: none; font-weight: bold; padding: 4px 4px 4px 4px; border-left-width: 0px; border-right-width: 0px; border-top-width: 1px; border-bottom-width: 0px; border-color: white; text-align: left; } /* end of code */ Thanks.
|
|
|
|
Tailslide
Posts: 5972 Joined: 5/10/2005 From: Out here on the raggedy edge Status: offline
|
RE: Struggling with CSS Validation - 10/1/2005 9:55:39
Having problems getting through to your page to check. What exactly is the validator saying about the errors?
_____________________________
"My strategy is so simple an idiot could have devised it" Little Blue Plane Web Design | Blood, Sweat & Rust - A Land Rover restoration project
|
|
|
|
coreybryant
Posts: 2422 Joined: 3/17/2002 From: Castle Rock CO USA Status: offline
|
RE: Struggling with CSS Validation - 10/1/2005 10:30:10
For the background, try background-image: url('../_includes/classic.gif'); and for the background color: background-color: #6595D6; . Also, what validator are you using?
_____________________________
Corey R. Bryant Merchant Accounts | Toll Free Numbers | My Blog | Expression Web Blog
|
|
|
|
scottishagate
Posts: 15 Joined: 2/6/2005 Status: offline
|
RE: Struggling with CSS Validation - 10/1/2005 10:34:03
Sorry about the link, this is the real address http://redhunter.com/cmy/ The Validator messages - background-image #Warning: The shorthand background property is more widely supported than background-image. background-repeat: repeat-x #Warning: The shorthand background property is more widely supported than background-repeat. If I change both to "background" I get other error messages.
|
|
|
|
scottishagate
Posts: 15 Joined: 2/6/2005 Status: offline
|
RE: Struggling with CSS Validation - 10/1/2005 11:09:08
Hi, Corey I'm using the Validator at http://www.htmlhelp.com/tools/csscheck/ I have changed as you suggested. Now I get different error messages, thus # Warning: The shorthand background property is more widely supported than background-color. # background-image: url('../_includes/classic.gif') Warning: The shorthand background property is more widely supported than background-image. # background-repeat: repeat-x Warning: The shorthand background property is more widely supported than background-repeat. Seem to be going round in circles!
|
|
|
|
spitfire
Posts: 424 Joined: 8/6/2005 Status: offline
|
RE: Struggling with CSS Validation - 10/1/2005 11:16:52
The validator is giving you a warning, not an error message. It suggests that the shorthand form for all the background properties is better supported by (modern) browsers. In your case you would use this code, which validates: #logo, #logo a {
background: #6595d6 url(../_includes/classic.gif) repeat-x;
color: white; } instead of background: #6595D6;
background-image: url(../_includes/classic.gif);
background-repeat: repeat-x;
color: white; Opinions are mixed about whether you should include image URLs within single quotes or double quotes or no quotes at all - they all validate. Personally, I've had no problems using any of them, but it is best to be consistent through the site. I could not get to the css validator (W3C) through the live site because of some validation problems with the html document itself: http://validator.w3.org/check?verbose=1&uri=http%3A//redhunter.com/cmy/ . Best to have a look at those (only 5) and fix them up as soon as you can.
|
|
|
|
coreybryant
Posts: 2422 Joined: 3/17/2002 From: Castle Rock CO USA Status: offline
|
RE: Struggling with CSS Validation - 10/1/2005 11:35:12
And one thing to keep in mind, if you specify the font color, you should specify the background-color
_____________________________
Corey R. Bryant Merchant Accounts | Toll Free Numbers | My Blog | Expression Web Blog
|
|
|
|
scottishagate
Posts: 15 Joined: 2/6/2005 Status: offline
|
RE: Struggling with CSS Validation - 10/1/2005 19:13:45
quote:
ORIGINAL: spitfire Ooooops - quick edit above - caught out. Check out the quotes around text/css. Ooops to you too! I already had the quotes, and just left them in, seems OK? Triumph, my page validates http://validator.w3.org/check?uri=http%3A%2F%2Fredhunter.com%2Fcmy%2F how do you get from there to the CSS validation? Regret my stylesheet is in a hidden folder.
|
|
|
|
scottishagate
Posts: 15 Joined: 2/6/2005 Status: offline
|
RE: Struggling with CSS Validation - 10/2/2005 6:21:26
Hi, Spitfire Sunday morning - up and running ... well ... not quite ... Thanks for link to W3C jigsaw validator, I hadn't realised I could validate the HTML and CSS in one go. It's more forgiving than WDG validator, my CSS validates without all the warnings about background-color, text-align, etc. http://tinyurl.com/8hyg4 I realise it's still a mess and full of redundancies. Will keep picking at it. I wish I could test CSS changes without continually updating, and perhaps breaking, my live site. Is there anything (free or cheap) that I could use locally? I have CSE HTML Validator Lite for html.
|
|
|
|
d a v e
Posts: 4054 Joined: 7/24/2002 From: England (but live in Finland now) Status: online
|
RE: Struggling with CSS Validation - 10/2/2005 9:20:50
try topstyle lite - free css editor might make things a bit easier for you http://www.bradsoft.com/download/index.asp
_____________________________
David Prescott Gekko web design
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|