MyBB Community Forums

Full Version: Need Help With TopMenu Links Centered
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
URL: GamingGeneral.net

Problem: need top menu links centered

[Image: ydqg7.png]
Easiest i would think is using a fixed width for your div class wrapper.
Then you could use change the wrapper thingie to something like:

.topmenu .wrapper {
    margin:0px auto;
    width: 600px;
}

Or if you want to keep everything scaling properly you could do the below thingie:

.topmenu .wrapper {
    margin: auto;
    width: 50%;
}

Below will also work better do what johnny S suggested Smile
Under (in global.css) .topmenu li add

display:inline-block; 

and remove

 float:left;

and under
 .topmenu  
add

 text-align:center;

Also your menu structure <ul><div><li></li><li></li></div></ul> is wrong ,you can't have div tag in unordered list tag.
It still doesnt work.

Both methods dont work
In global.css find

.topmenu {
	background: #666 url(../../../images/ydgl/menubg.png);
	list-style-type: none;
	display: block;
	height: 49px;
	margin-top: 0px;
	text-transform: uppercase;
	text-shadow: -1px 0px 1px #222;
	font-family: tahoma,arial,trebuchet MS;
	font-size: 10px;
}

and after

font-size: 10px;
add

           text-align:center;

now find

.topmenu li { 
	float: left;
	line-height: 49px;
}

and
float:left;
replace with
display:inline-block;


Via dragonfly : http://i.imgur.com/Qxcrh.png http://i.imgur.com/geUT4.png (it's working).
Still need help on this! They need to be pushed to the middle!

(2012-10-15, 09:46 PM)Johnny S Wrote: [ -> ]In global.css find

.topmenu {
	background: #666 url(../../../images/ydgl/menubg.png);
	list-style-type: none;
	display: block;
	height: 49px;
	margin-top: 0px;
	text-transform: uppercase;
	text-shadow: -1px 0px 1px #222;
	font-family: tahoma,arial,trebuchet MS;
	font-size: 10px;
}

and after

font-size: 10px;
add

           text-align:center;

now find

.topmenu li { 
	float: left;
	line-height: 49px;
}

and
float:left;
replace with
display:inline-block;


Via dragonfly : http://i.imgur.com/Qxcrh.png http://i.imgur.com/geUT4.png (it's working).

Solved!!! Thank you bro