The semicolons are only optional after the last property definition within the {}'s

example.class {
    font: regular 14em/15em Arial, Verdana, sans-serif;
    color: #f90;
position: inherit /<- a semicolon for the last property definitions is optional/
}


example.class2 {
    ....
    color: #fff;
}; /<- NEVER put a semicolon after the {}'s, because the browser runs into it and stops parsing your CSS/

But a good rule of thumb is to ALWAYS put semicolons after your property definitions.
Hope that clarifies a few things.

- Brandtley


On 1/1/2011 4:12 PM, justaguy wrote:
Beautiful, thank you.  I thought the trailing semicolons are optional
and didn't know they messed things up.

On Dec 29 2010, 12:17 am, Legacy Dave<[email protected]>  wrote:
Hi,
I just tried your current page fixing your styl the way Ashok told you
to.remove the trailing semicolon after the brace. Your code should
look like this:

<style type="text/css">
p {font-family: verdana;font-size: 11pt;}
span {color:navy;}
</style>

I just tried it in FF 3.6, Chrome 8.0, and IE8 and the blue text
showed up as it should.on all three browsers.
The trailing ; you have added after the } is NOT optional - it is
incorrect and has caused your problems.

--
--
You received this because you are subscribed to the "Design the Web with CSS" 
at Google groups.
To post: [email protected]
To unsubscribe: [email protected]

Reply via email to