Simple Machines Community Forum

Customizing SMF => Graphics and Templates => Aiheen aloitti: EliteXile - joulukuu 20, 2011, 12:58:46 IP

Otsikko: Centering my navigation bar?
Kirjoitti: EliteXile - joulukuu 20, 2011, 12:58:46 IP
How would I center my navigation bar?

My theme is BlueFox.
Otsikko: Re: Centering my navigation bar?
Kirjoitti: IchBin™ - joulukuu 20, 2011, 03:43:55 IP
It helps if you post a link to your site so people can see the theme.
Otsikko: Re: Centering my navigation bar?
Kirjoitti: EliteXile - joulukuu 20, 2011, 03:58:35 IP
pkxile.comoj.com
Otsikko: Re: Centering my navigation bar?
Kirjoitti: IchBin™ - joulukuu 20, 2011, 04:09:07 IP
Menu's like that aren't written so they can be centered without significantly changing the code. It might be easiest if you just add some padding to the containing div that it is in to push the menu as close to center as you like.

#toolbar {
    background: url("../images/custom/nav_bg_small.gif") repeat-x scroll 0 0 transparent;
    height: 34px;
    position: relative;
}

Add your left/right padding to the code above in the index.css file to get it where you want.
Otsikko: Re: Centering my navigation bar?
Kirjoitti: EliteXile - joulukuu 20, 2011, 05:19:34 IP
Lainaus käyttäjältä: IchBin™ - joulukuu 20, 2011, 04:09:07 IP
Menu's like that aren't written so they can be centered without significantly changing the code. It might be easiest if you just add some padding to the containing div that it is in to push the menu as close to center as you like.

#toolbar {
    background: url("../images/custom/nav_bg_small.gif") repeat-x scroll 0 0 transparent;
    height: 34px;
    position: relative;
}

Add your left/right padding to the code above in the index.css file to get it where you want.
Thanks!