morktron
morktron

Reputation: 915

Can't align H1 tag to left with CSS?

Hi I seem to be having an issue trying to align an H1 tag to the left. I know it is something in my template.css file but I can't work out what.

Have a look >

Should be easy for any CSS guru I hope ;)...

Upvotes: 3

Views: 10757

Answers (3)

Dave Ward
Dave Ward

Reputation: 60580

Try changing your h1 style to this:

#flypage h1 {
  float: left;
  margin-bottom: 20px;
  margin-top: 20px;
  text-align: left !important;
  width: 100%;
}

Upvotes: 3

Tyson
Tyson

Reputation: 6244

It's hitting that floated "Previous Page" link and wrapping around it. It's left-justified, but it just looks like it's centered because of where it hits that float.

Try:

h1 { clear: left }

Upvotes: 3

Gumbo
Gumbo

Reputation: 655269

Use a developer tool like Firefox’ Firebug, Safari’s WebInspector or IE’s Developer Tools to inspect the document. Those will probably show your, that it’s the .previous_page’s bottom margin that causes a conflict with the top margin of the h1.

Upvotes: 4

Related Questions