dmaher
11-19-2009, 09:53 PM
Hi, sorry for the newbie question, I'm new to all this but having a go.
What I'm trying to achieve is extremely simple, essentially I just want a part of some text in the footer a certain colour. I thought acc, for accent might be a reasonable name for it.
I tried this:
acc{color: #6600FF; clear:both;}
and then in my footer.php,
A <acc>quick</acc> brown fox jumps over the lazy dog.
Now that works in FF, however the validator didn't really like it. It said acc not defined.
So I changed it to a class so:
.acc{color: #6600FF; clear:both;}
and
A <span class="acc">quick</span> brown fox jumps over the lazy dog.
That also works and the validator seems okay with it, which is all good.
However it got me wondering, can you not have 'custom' selectors similar to say p or h1 etc. and I have to make it a class and use the span tags every time ?
What I'm trying to achieve is extremely simple, essentially I just want a part of some text in the footer a certain colour. I thought acc, for accent might be a reasonable name for it.
I tried this:
acc{color: #6600FF; clear:both;}
and then in my footer.php,
A <acc>quick</acc> brown fox jumps over the lazy dog.
Now that works in FF, however the validator didn't really like it. It said acc not defined.
So I changed it to a class so:
.acc{color: #6600FF; clear:both;}
and
A <span class="acc">quick</span> brown fox jumps over the lazy dog.
That also works and the validator seems okay with it, which is all good.
However it got me wondering, can you not have 'custom' selectors similar to say p or h1 etc. and I have to make it a class and use the span tags every time ?