.top p {background:transparent url('bg.gif') no-repeat top right;}
and
.top p {background:transparent url('bg.gif')no-repeat top right;}
are nOT the same. The difference is the space between the url parenthesis and the repeat bit. An hour of tearing my hair out makes me pass this along. If you do it without the space using xhtml 1.0 strict, the background images will not show in IE 5, 5.6 or 6.
This has pretty much been a convention/habit of mine to leave no space there so this had me tearing my hear out for close to an hour.
Yeah, making a habit of keeping your markup neat and clean will help you avoid these kinds of problems. This is where being anal about whitespace, indentation, brackets, semi colons, etc pays off.
everybody post your css conventions^ if you would. Mine is odd I think, it doesn't match most people's, the space either side of the colon and the tab on the closing bracket seem to be unique to me, helps *me* to be able to scan a long stylesheet but tends to irritate anyone else that has to look through mine
Usually my biggest mistakes aren't really incorrect syntax, usualy I just put things where I didn't want them, like giving paragraph tags the color I wanted for the header tags. Most of my problems are with PHP anyway, that's another story though.
If it's short like that sometimes I'll combine the opening bracket with the first line to keep from taking too much space, but otherwise I like having the opening and closing brackets in line like that for clarity.
I'm the same as reisio's first example, it just seems to make sense as most of the time I'll apply more than one property to a selector, if they're all on one line then they're harder to read and edit.
selector space bracketopen bracketclose backarrow return return up arrow tab
Oops, my spacing didn't go through the right way - I set it up just like briggl has it. I tab over one tab for the brackets, so if the selector is longer than one tab length, I add a carriage return, so all of my brackets are always vertically aligned, along with the left edge of all the attributes.