I have a Wordpress theme that I'm editing for my website. By default the theme is positioning the Logo to the left, and I would like to center it. After hours of playing around, and no support from the theme author, I thought I'd post the question here.
Here is the CSS pertaining to the Header:
When I use margins to position it, it looks great at most screen resolutions, although at 800x600 its way too far to the left. I'd like to center the logo for all visitors.Code:/* Header */ #header { background:url('images/header-bg.png') repeat-x; height:40px; overflow:hidden; padding:120px 0 0 0; position:absolute; top:0; left:0; width:100%; z-index:5; } #header-s { background:url('images/shadow-b.png') repeat-x; height:10px; position:absolute; top:160px; left:0; width:100%; } #header-container { margin:0 auto; width:960px; } #logo-container { position:absolute; top:0; left:0; width:100%; z-index:10; } #logo { margin:0 auto; padding:0 0 0 15px; width:945px; } #logo a { text-decoration:none; } #logo p { color:#eee; font-size:30px; line-height:30px; margin:35px 0 0 0; text-align:left; } #logo span { color:#eee; font-size:18px; line-height:18px; margin:5px 0 0 0; text-align:left; }
I have also tried centering the logo container with:
I think the problem is that the theme using margin to position the logo by justifying it to the left, and adding a 5px margin to the top. I can't simply add 500px to the left because it doesnt display properly. I'm sure there is an easy solution, and I just don't know enough about CSS to figure it out. Any help is greatly appreciated!Code:margin: 0 auto; text-align: left;



Reply With Quote


Bookmarks