Saturday, 14 September 2013

Is this a good approach to add margin-left to H2 elements

Is this a good approach to add margin-left to H2 elements

I'd like some (not all) of my H2 headlines to have a left margin of 10px
compared to the "regular" H2 lines. I tried the below code which works but
was wondering if there's a better/cleaner way to achieve this. Thanks
HTML
<h2 class ="marginleft10px">Blablabla</h2>
CSS
h2 {
color: #2970A2;
font-weight: 300;
font-size: 18px;
}
.marginleft10px {
margin-left: 10px;
}

No comments:

Post a Comment