|
Nicole -> RE: confussed css beginer using fp02 (8/27/2005 21:02:00)
|
Hi Steve, Firstly, one of the main objectives of CSS is so you can clean up all the code in a page and have it styled from an external style sheet. It's important that you remember that inline styles (the ones appear alongside each element) take precedence over other styles, embedded styles take precedence over any external styles but not over inline styles, and external style sheets (like the one you're linking to) only take effect if elements aren't styled either inline or with an embedded style at the top of your code. By linking to a style sheet and leaving all the code the same, that style sheet isn't doing anything to the styles of individual elements on that page because you still have those elements styled inline. I hope that makes sense. So, yes, you'll have to go through and take out any inline properties and values and place them in your external style sheet. For instance: For an images that you want consistently displayed across many pages, or many images in the same page, your style sheet could look like this: img { border: 1px solid #000000; float: right; margin: 5px; } If you want half your images to be aligned right and the other half left, create classes for your images to produce the desired result: img.class1 {......... } img.class2 {....... } Then take out the inline styles for the images in your page code and just leave the <img> tag but include the class: <img class="class1> I hope that helps. Also, quite often when trying to validate a page, it's best to attack one error at a time and then revalidate. Often one unclosed tag will create 39 errors, but once that tag has been closed, you'll have say 5 errors. Nicole
|
|
|
|