yandoo Posted January 10, 2013 Share Posted January 10, 2013 (edited) Hiya I have an <h2> tag that I have added added a class too. <h2 class="TitleText"> But when i look at it compared to a <p class> in a browser it looks different in font, although they do have the same size and colour properties? Why is this please? .TitleText { font-family:Arial, Helvetica, sans-serif; font-size:22px; color:#669900;TEXT-DECORATION: none;} So I guess its because it is a heading and not a paragraph tag but why can i not fully control how it looks? Edited January 10, 2013 by yandoo Quote Link to comment Share on other sites More sharing options...
Christian F. Posted January 10, 2013 Share Posted January 10, 2013 I'm willing to bet that there are some default browser styles you haven't overwritten. Most likely font-weight. Open the page in your fav browser with developer tools (Opera, Chrome or Firefox with Firebug), and then check the computer CSS styles for both elements. Should spot the difference right away. Quote Link to comment Share on other sites More sharing options...
yandoo Posted January 10, 2013 Author Share Posted January 10, 2013 Hiya, thanks for reply. Yes of course the weight properties! I feel silly now it seems so obvious. Can i ask you something else that too may seem silly..? How can I adjust the spacing above and below the heading? With the h1 it seems to add space both above and below it as its a heading... Quote Link to comment Share on other sites More sharing options...
yandoo Posted January 10, 2013 Author Share Posted January 10, 2013 It ok ive done it adding: margin-top: 3px; margin-right: 0px; margin-bottom: 3px; margin-left: 0px; Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.