News:

Want to get involved in developing SMF? Why not lend a hand on our GitHub!

Main Menu

How to center the Header?!

Started by gmbhneo, September 08, 2010, 02:29:00 PM

Previous topic - Next topic

gmbhneo

Hey Guys,

i wonder how to center my header. I think it needs to be done in the .css but i cant find the right place.

This is the Link of the Page where u can see the "Header" (placeholder) and what i mean.

www.hma4ever.de/Forum

Ill add my .css for you to let me know, what needs to be changed :D

would be nice if you could help me with that :D

Ah and if you could tell me how to center the menu items (Home, Search etc.) would be great too! :D
Visit my Board at: http://www.neos-shell.de

mashby

background-position: center is the trick. Edited style.css attached.
Always be a little kinder than necessary.
- James M. Barrie

gmbhneo

Thanks for that, but i tried this too and the problem with it is, that the header now is not at the top of te page. Have a look at the page now. you will see what i mean.
Visit my Board at: http://www.neos-shell.de

mashby

center top might be betterer then. For centering the menu items, there's the messaging over on the right which might get in the way?
Always be a little kinder than necessary.
- James M. Barrie

gmbhneo

awesome! thanx for that :D ... works great :D ...

Yes... maybe your right .. hmmm .. is there any way to get that out of that box? (maybe on the header in the upper right corner or so?

And how can i get a picture behind the menu buttons, so the bg isnt show trough?

THX for your help !!! :D
Visit my Board at: http://www.neos-shell.de

gmbhneo

#5
If have now tried many ways like "Background-image:" or so but i cant get a grafic behind my menubuttons. Is there any way to fix this? I also tried copy the code of anouther Theme, but it dont work well (was massed up completely) ... I just want to have a plain color or a grafic behind the buttons, so the header is not show trough. (you need to scroll a bit, to see what i mean).

I helped myself out with make the grafic with the background, but if you scoll, the background will stay ... just try it yourselfe, youll see...

Would be nice if someone could help me with that too.

ive made a picture to let you kno wwhat i mean.

Visit my Board at: http://www.neos-shell.de

mashby

Maybe something like this (add this to the style.css anywhere):
#nav { background: url("URL2IMAGE") repeat; }

I was thinking a semi-transparent PNG would look cool, but the creativity is in your hands.
Always be a little kinder than necessary.
- James M. Barrie

gmbhneo

awesome! this is working just great! :D ... damn, how could i miss this?! ...
Visit my Board at: http://www.neos-shell.de

gmbhneo

Awesome, everything is working as it should :D ..

my next question is how to center the menu icons?
Visit my Board at: http://www.neos-shell.de

Deaks

~~~~
Former SMF Project Manager
Former SMF Customizer

"For as lang as hunner o us is in life, in nae wey
will we thole the Soothron tae owergang us. In truth it isna for glory, or wealth, or
honours that we fecht, but for freedom alane, that nae honest cheil gies up but wi life
itsel."

Advertisement: