Many thanks Paul, it’s appreciated - border:1px solid #fff; is what I’ll be using now.
Also, while I’m trying to tidy up the css a little, in some style sheets I’ve seen, it displays styles in different ways for table parts - ie, in some it may say :
Well in your second example there isn’t an element called <tablename> but I think I know what you mean ;). It all depends on your pages. Will you ever have an element that’s not a table with that .tablename calss?
Generally you don’t want to do this
table.classhere
div.classhere
It can get very confusing to style each element with the same class, aka the first examlpe will taarget a <table> with the “classhere” class. The second with a <div> matching that class. It gets very hectic and confusing to manage :).
Generally I just do .classhere (more appropriate names though :)).
Later, after you go back to edit changes a few months later, it can be useful if you have put the div.classhere to remember which element, but it’s not really needed
It’s the same issue. The td in td.classname is not needed. .classname will apply to any element it’s attached to anyway. You might as well choose one pattern and use it for all elements, e.g.
DEZ
I think you meant “border-width:”
There is little difference between the two examples. One is a shorthand, so if you need to declare a bunch of things at once I highly recommend using the shorthand. it really has nothing to do with “future proofing” anything.
sometimes it comes in handy NOT to use the shorthand. for example
li a{ display:block; text-decoration:none; color:#333; border-bottom:2px solid transparent; }
li a:hover{ border-color: #e4e4e4 }
lol - I know what you meant and the example is good but actually both those are shorthand properties also :). Of course you are right and sometimes it’s useful to be more specific.
(As an aside (and not to be pedantic) note that IE6 doesn’t do transparent borders and will use the elements color if no border-color is defined. IE6 always spoils the party!)
Thanks all - it’s appreciated. It does get a little confusing sometimes, but it makes more and more sense as time goes on and with the help from you lot