News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Trying to center logo in style.css

Started by derekj54, March 16, 2010, 02:55:58 AM

Previous topic - Next topic

derekj54

#logo {
   position: absolute;
   top: 35px;
   left: 300px;
   display: block;
   width: 342px;
   height: 250px;
   cursor: pointer;
   background: url(./images/img/logo.png) no-repeat;

tried a lot of things but not sure what to change to center it, i got it centered on my resolution but its definately not good enough

Oldiesmann

Get rid of the position, top and left parts, and add text-align: center; to it. That should center it.
Michael Eshom
Christian Metal Fans


derekj54

the site im workin on is hxxp:destinyeq2.com/ [nonactive]
given that the logo sucks right now just a placeholder for a good one but right now i got it set at left at a % so it doesnt look terrible when you change the resolution but its still bad, i tried putting center in there like you said, i tried on a few different line and i looked up some .css pages for other commands but nothing has worked

smp420

use
margin-left:auto;
margin-right:auto;
"Things turn out best for those who make the best of the way things turn out." -Jack Buck

derekj54


smp420

"Things turn out best for those who make the best of the way things turn out." -Jack Buck

Advertisement: