?

Log in

No account? Create an account

Previous Entry | Next Entry

Centering A Header?

  • Jan. 9th, 2012 at 5:27 PM

So. I finally found a code that works for my header, but the image is so far to the right it looks painfully off kilter to me.

Is there any way to center an image?

BTW, this is the code I'm using:

#header-inner {
background-image: url(http://i1206.photobucket.com/albums/bb458/autumnatmidnite/sherlock2x02_3531-1.jpg);
}

#header, #header-content {
background-image: none;
}

#header-inner {
background-image: url(http://i1206.photobucket.com/albums/bb458/autumnatmidnite/sherlock2x02_3531-1.jpg);
height: 400px;

}

Comments

( 2 comments — Leave a comment )
dana_cz
Jan. 9th, 2012 10:52 pm (UTC)
You don't need two #header-inner, so just delete the very first one (the one not containing width) and add into the second one this:

margin: 0 auto;
width: 671px; /* the width of your image */

autumnatmidnite
Jan. 9th, 2012 11:35 pm (UTC)
THANK YOU!!!

That fixed the problem straight away :D
( 2 comments — Leave a comment )

Latest Month

March 2016
S M T W T F S
  12345
6789101112
13141516171819
20212223242526
2728293031  

S2 Help Communities

Tags

Powered by LiveJournal.com
Designed by chasethestars