Tuesday, January 16, 2007

Contextual healing

The architects emailed back yesterday to say that "the proposal is acceptable" and asked me to send them a contract and invoice for the deposit. Yay! That's just a small "yay", because there's no real celebrating until I have a check in hand, but since I fired them off the contract and invoice yesterday, I should have it soon.

Here's what I learned today. Okay, I sort of knew this, but obviously not well enough. If I'm using a CSS style in the of a page, expecting it to "beat" a CSS style which is in an external style sheet that applies to the same element, the one selector has to match the context of the other. In other words:
#home a
doesn't "beat"

#navul li a 
In order to take precedence over the second selector, the first selector has to include the same context as the second:

#navul li#home a
I was actually kind of jazzed that this worked. I was even more jazzed that I was able to hand-code a nested nav list and make all the links work perfectly. This is the kind of stuff that I don't do for fun, but when I have to do it for a client project, I'm still happy to have gained some knowledge and enjoy the process. I guess I don't hate web dev so much after all!

0 Comments:

Post a Comment

<< Home