Andrew Nussear
Andrew Nussear

Reputation: 11

Centering a DIV in CSS

Here is the link to a site I am working on for a friend - http://jayclarkephotography.com/

I am trying to center the logo. I have tried various ways, but am new to making websites, so I think I am missing something.

Upvotes: 0

Views: 39

Answers (2)

Hidde
Hidde

Reputation: 11961

On the a inside the header, add the following CSS:

display: block;
width: 340px;
margin: 0 auto;

You might want to ajust the padding of the header, because the logo is not dead center.

Upvotes: 0

verbanicm
verbanicm

Reputation: 2526

You can acheive this through CSS, tell the browser you want auto margins on the left and right, add this to the image tag

style="margin:0 auto;"

Upvotes: 0

Related Questions