colin Posted March 8, 2006 Share Posted March 8, 2006 (edited) This is my html. and the css.with which I keep getting "parse error " and "unrecognized" with and it normaly shows the #header or in this case #banner.Thank you Colin. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> <title>growing aroids</title> <style type="text/css"> body { margin: 0; padding: 0; font-family:"comic sans ms",sans- serif; color: #000000; background-color:#f5deb3; } #container { width:750px; background-color:#d2b48c ; margin-left:auto; margin-right:auto; border: 1px solid #ff0000; } #banner { background-color: #8b4513; border-bottom: 1px solid #ff0000; text-align:center; } #banner h1 { margin: 0; padding: .5em; color:#ffff00; } #nav {padding:5px; background-color:#8b4513; border-right:solid 1px #ff0000; height:800px; float: left; width: 135px;} #nav p { margin-top: 0; } #content {height:800px; padding-top: 0.5em; margin-left:150px; } #content h2 { color:#ffff00; margin-top: 0; text-align:center; } #footer{ height:35px; line-height:35px; clear: both; background-color:#8b4513; padding-left:10px; text-align: right; border-top: 1px solid #FF0000; } </style></head><body><div id="container"> <div id="banner"> <h1>GROWING AROID'S</h1> </div> <div id="nav"> <p> </div> <div id="content"> <h2> welcome </h2> <p> </div> <div id="footer"> <p> <a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01 Transitional" height="31" width="88"></a> </p> </div></div></body></html> Edited March 8, 2006 by Jonas Link to comment Share on other sites More sharing options...
raimo Posted March 8, 2006 Share Posted March 8, 2006 This is my html. and the css.with which I keep getting "parse error " and "unrecognized" with and it normaly shows theĀ #header or in this case #banner.Thank you Colin. <{POST_SNAPBACK}> 1. there is two unexpected p-tags (remove them):line 81 column 1 - Warning: trimming empty <p>line 88 column 1 - Warning: trimming empty <p>2. there is small (space) typo in fonts:font-family: "comic sans ms", sans- serif; sans- serif; must be as sans-serif;3 if You are using background-color You must use color too.I mean, there must be both, color and background-color all cases if other is:background-color: #FFFFFF;color: #C0C0C0;Very handy is inherit value with background (or with color):color: #C0C0C0;background-color: inherit;4. #container background-color:#d2b48c ;there is one space at the end of string, should bebackground-color:#d2b48c;No errors or warnings anymore. Link to comment Share on other sites More sharing options...
sbrownii Posted March 8, 2006 Share Posted March 8, 2006 I just ran it through the validator at validator.w3.org with no problems... no parse error or unrecognized... just a few warnings about the css...what validator were you using colin? Link to comment Share on other sites More sharing options...
colin Posted March 9, 2006 Author Share Posted March 9, 2006 I just ran it through the validator at validator.w3.org with no problems... no parse error or unrecognized... just a few warnings about the css...what validator were you using colin?<{POST_SNAPBACK}> Hi sbrownii, thanks for your help with my validating problem.I've been using the w3c validator for my html and css. I've taught myself using their tutorial's. I tried it again but no luck it seems that the Gods have deserted me,I'll persevere though I refuse to be beat. Thanks Colin. Link to comment Share on other sites More sharing options...
colin Posted March 9, 2006 Author Share Posted March 9, 2006 1. there is two unexpected p-tags (remove them):line 81 column 1 - Warning: trimming empty <p>line 88 column 1 - Warning: trimming empty <p>2. there is small (space) typo in fonts:font-family: "comic sans ms", sans- serif; sans- serif; must be as sans-serif;3 if You are using background-color You must use color too.I mean, there must be both, color and background-color all cases if other is:background-color: #FFFFFF;color: #C0C0C0;Very handy is inherit value with background (or with color):color: #C0C0C0;background-color: inherit;4. #container background-color:#d2b48c ;there is one space at the end of string, should bebackground-color:#d2b48c;No errors or warnings anymore. <{POST_SNAPBACK}> Thanks for your help raimo, I'll give your suggestions a try and see how I get on. I never realised how much of a problem seemingly minor things could be. Thanks again , Colin. Link to comment Share on other sites More sharing options...
vchris Posted March 9, 2006 Share Posted March 9, 2006 I checked my css on w3c and I have no errors but only warnings. Most of them are because there is no background-color specified. Is that normal to have all those warnings?For instance I have: .red { color: #FF0000; }It gives a warning because no background color to .red Link to comment Share on other sites More sharing options...
sbrownii Posted March 9, 2006 Share Posted March 9, 2006 warnings are usually about how you SHOULD do things...errors are about... well... errors...The validators are not perfect, either.Search the net to read about why you SHOULD define the background color and font color together.you can started by looking here Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now