Home › Forums › CSS › What are the best ways to deal with different bottom margins? › Reply To: What are the best ways to deal with different bottom margins?
September 1, 2013 at 7:09 pm
#148759
Tom Houy
Participant
Why not just use an Adjacent Sibling Combinator? You could specify a unique margin on the H2 for any instances where it comes directly after an H1, without the need to add custom class markup to the HTML itself.
Something like:
h1 + h2 {
margin-top: 5px;
}