I particularly like how the default skin has a horizontal line below each H1, H2, etc element. I wanted to emulate it for my own site and saw that it uses the class "firstHeading". Try as I might though, I could not actually find where "firstHeading" was defined. Could someone please help me with this?
Thanks, Kent Wang
Hello,
Kent Wang schrieb:
I particularly like how the default skin has a horizontal line below each H1, H2, etc element. I wanted to emulate it for my own site and saw that it uses the class "firstHeading". Try as I might though, I could not actually find where "firstHeading" was defined. Could someone please help me with this?
/style/monobook/main.css:
.firstHeading { margin-bottom:0.1em; } /* (line 236) */
But I think you got there something wrong. .firstHeading is not responsible for this line. The line is directly defined for each heading independant of a class or id:
h1, h2, h3, h4, h5, h6 { /* (line 93) */ color: Black; background: none; font-weight: normal; margin: 0; padding-top: 0.5em; padding-bottom: 0.17em; border-bottom: 1px solid #aaaaaa; }
h3, h4, h5, h6 { /* (line 104) */ border-bottom: none; font-weight: bold; }
It just defines this line for each heading, and then removes it for h3 ... h6.
<ad> You could use Firefox in combination with the Web Developer extension to easily get such information. Just click /CSS/ --> /view style information/ and click on a heading to see which CSS rules apply to it. It works perfect! </ad>
Eckhart
wikitech-l@lists.wikimedia.org