0

I was trying to remove extra margin/padding around the H1 tag. Suggestions from other posts included setting the top/bottom margins of the H1 tag to 0, using a negative margin, and changing the line-height. Nothing worked...

So I used Firebug to see if it could help. Sure enough there was a margin around the H1 when I looked at the Layout in Firebug. When I changed the number to 0, it added:

style="margin-top:0px; margin-bottom:0px;"

to the H1 tag (as was suggested in other posts) and it fixed the issue. However when I added an entry to the external CSS file to style the H1 tag there, the styling didn't work (i.e. the margin/padding was back).

Does this mean there's a bug in my external CSS?

Thank you!!

Ken

Sphvn
  • 5,247
  • 8
  • 39
  • 57
Ken Boone
  • 143
  • 2
  • 9
  • Post your CSS and HTML so we can see what you have tried. – pschueller Mar 12 '15 at 08:57
  • 1
    internal stylesheet have more priority than external.. try to find style for H1 there already in your external css file. If so, modify there.. Use css reset and line-height for h1.. – G.L.P Mar 12 '15 at 09:01

2 Answers2

1

Inline style is the highest priority. Your problem resides in prioritizing your rules.

Check out This article

Charleshaa
  • 2,218
  • 2
  • 21
  • 25
0

You can add some class to your H1 tag like "", and through that class you can style in external sheet.

stanze
  • 2,456
  • 10
  • 13