Jump to content

Still New to CSS but Making Progress


jeffamm

Recommended Posts

OK, with a lot of help from Snoja I cleaned up and fixed all my errors, but when I submit the file for validation it doesn't say "Valid", it just shows no error. I was under the impression that when you were valid you would see a green header saying "Valid" or something similar. I do have many warnings still to clean up but I've been told they don't "count". What message do others receive when they are validated?Also, many of the warnings are to add either a background color and/or a color to many CSS classes that haven't otherwise needed them. I tried dealing with this last night by adding background-color:transparent but it didn't appear to be acceptable to the validator. Shouldn't transparent work - the CSS Primer I read seemed to indicate it was fine to use?thanksJeff

Link to comment
Share on other sites

When you say "Jason", I presume you accidentily rearranged the letters in my name, right? :)The green line that says valid is only for the HTML validator located at http://validator.w3.org/ for some reason. If no errors are found, your css file is valid. Warnings aren't errors, but you might still want to take care of them for reasons listed below. Yeah, despite being a valid colour according to the w3 CSS 2 spesification, "transparent" for some reason isn't accepted by the validator, so you should assign the colour that is below the element, or inherit (inherits colour from parent element). Nothing to do about that really. The reason you need color with background-color or background-color with color is for people who have stylesheets on their own. If nothing is specified in your stylesheet, user stylesheets take over, and so you may risk getting horrible contrasts if, say, the user always has a blue background (unlikely horror example, I know). So to make absolutely sure your page is displayed the way you want it to be displayed, you should assign "background-color" a color or inherit.And here's an example of valid css from w3.org itself:http://jigsaw.w3.org/css-validator/validat...;usermedium=allLots of warnings, but still valid though.:)

Link to comment
Share on other sites

Jonas,Are you sure you read it right? Look again, it says Jonas.(OK, kidding aside, I just changed it - sorry to get it wrong, I was up about as late last night in my time as you were in yours.)Thanks for your comments, they were very helpful again. Anyway, the link you gave shows the file and says "Congratulations" and here, use the valid CSS icon. I'm not getting the congratulations or the suggestion to use the icon, which for some reason I really want. I'm just wondering why it's not coming up?

Link to comment
Share on other sites

Line : 86 (Level : 1) You have no background-color with your color : a img
I can't believe W3C have that warning. The others- OK, but this one: funny.You might not be getting it if you're inputting your CSS directly (as code). Try giving it by a URL.
Link to comment
Share on other sites

Do you have a link to the updated css file? This one:http://www.allmusicmethods.com/main.cssstill has errors in it.

Jonas,Are you sure you read it right? Look again, it says Jonas.
Looks to me like it says Jason though.:)
Link to comment
Share on other sites

Do you have a link to the updated css file? This one:http://www.allmusicmethods.com/main.cssstill has errors in it.
The updated one is still on our staging server until I finish some more testing. Then I'll move it to our live server and submit the URL. Right now I'm having some trouble getting the stage server to recognize the line-height attributes in a couple of our CSS elements. I'm going to experiment with % values instead of the 1.4 type numbers that I've been using.thanks
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...