Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

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?

#148558
Paulie_D
Member

Is it better to have a pre-set classes of different margins

I dislike creating classes ‘just in case’.

or do you usually tag that element with a new class with a semantic name?

I’m more likely to target that specific h1/h2 based on it’s parent selector element or class

main h1 {
margin-bottom:0;
}

for instance.

If I find myself using that structure more than once then I would consider making a special class.