Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CSS, DIV and H1

Tags:

html

css

I'm using a template and the titles are inside a div. I want to apply h1 to the title but it goes bad (the div is styled with css, and there is no styling for h1)

Normally this is what it is:

<div class="content-pagetitle">Title</div>

I'm changing to:

<div class="content-pagetitle"><h1>Title</h1></div>

But it goes bad.

I tryed to use the same styling content-pagetitle for h1. It didn't worked

<h1>Title</h1>

(It does not become same as content-pagetitle)

Is there a css code that says "do not apply any styling to h1"?

like image 977
ilhan Avatar asked Dec 12 '22 23:12

ilhan


1 Answers

Might try removing margins and padding on the H1

h1 { margin:0; padding:0 }

I would encourage you to explore you dom (via firebug or any equivalent) and see which styles are being applied to the H1. You may need a more specified selector to apply the aforementioned rules to a particular h1 element only.

like image 179
Sampson Avatar answered Dec 23 '22 19:12

Sampson