CSS applied in external files, or in the document head isn't known inside the JavaScript style object. Look:
head
style
Both links have the color applied in the head and the display: block inline.
display: block
Quirksmode.org for more information.
Home - More stuff