Simple Machines Community Forum

Customizing SMF => Graphics and Templates => Aiheen aloitti: lendario - heinäkuu 14, 2011, 05:06:57 IP

Otsikko: Center menu
Kirjoitti: lendario - heinäkuu 14, 2011, 05:06:57 IP
I would like to know how to center the menu of my forum.
Cntralizar images that are used for navigation.

Link to the forum:
http://mmorpgbr.net/smf/index.php


hugs o/
Otsikko: Re: Center menu
Kirjoitti: Deaks - heinäkuu 14, 2011, 06:02:35 IP
as you are using a modified dzinerstudio theme I would suggest asking on there support forums.
Otsikko: Re: Center menu
Kirjoitti: Sir Osis of Liver - heinäkuu 14, 2011, 10:37:27 IP

Hey, Lendario.  Try this -

In index.template.php find this:



<div id="toolbar">
',template_menu(),'
</div>




Change to this:



<div align="center">
<div id="toolbar" style="display: inline-block;">
',template_menu(),'
</div>
</div>




While you're here, look up your Search box thread and grab the correct bg image for the widget we put in your header.

Otsikko: Re: Center menu
Kirjoitti: lendario - heinäkuu 15, 2011, 08:44:29 AP
Krash always helping me *-*
Thank you so much.
Look man the pty code that you asked me not look exactly like this:


<div id="toolbar">
',template_menu(),'
</div>


It is well:

<div id="toolbar">
<div id="nav">
',template_menu(),'
</div>
</div>


Prem adptei the code you sent me to stay right there:
so let
       <div align="center">
<div id="toolbar" style="display: inline-block;">
<div id="nav">
',template_menu(),'
</div>
                </div>
</div>


More so, the menu actually centered over the bottom of it had been independent only button, leaving the side without any background.
As the picture below.


About the search box *-*
I will put it now and thanks again
Otsikko: Re: Center menu
Kirjoitti: Sir Osis of Liver - heinäkuu 15, 2011, 11:02:17 IP

This should work-



<div id="nav" align="center">
<div id="nav" style="display: inline-block;">
',template_menu(),'
</div>
</div>




If it's not right, attach your index.template.php and /css/index.css.

Otsikko: Re: Center menu
Kirjoitti: Gary - heinäkuu 15, 2011, 11:26:47 IP
^ For reference that code is invalid, you cant declare an id attribute more than once. :P
Otsikko: Re: Center menu
Kirjoitti: Sir Osis of Liver - heinäkuu 15, 2011, 11:50:03 IP
Oops.



<div id="nav" align="center">
<div style="display: inline-block;">
',template_menu(),'
</div>
</div>




Thx, Gary.

Otsikko: Re: Center menu
Kirjoitti: lendario - heinäkuu 16, 2011, 07:42:21 AP
Neither the first nor the second worked.
Both were among the most bottomless in any corner.  :'(
Otsikko: Re: Center menu
Kirjoitti: Sir Osis of Liver - heinäkuu 17, 2011, 12:28:07 AP
Attach your index.template.php and /css/index.css.

Otsikko: Re: Center menu
Kirjoitti: lendario - heinäkuu 17, 2011, 09:46:02 AP
Attached.
Otsikko: Re: Center menu
Kirjoitti: Sir Osis of Liver - heinäkuu 17, 2011, 03:43:50 IP

No way to test it, but this should work -



<div id="toolbar" align="center">
<div id="nav" style="display: inline-block;">
',template_menu(),'
</div>
</div>



Your modded navbar already has the second div wrapper, so you don't need another one, just add the formatting codes.

Otsikko: Re: Center menu
Kirjoitti: lendario - heinäkuu 19, 2011, 11:39:55 AP
Look at the code works however the letters of the forum have become enormous. Even with the code removed are still giants, please help me urgently.


http://img202.imageshack.us/img202/886/screen1mh.jpg


http://img204.imageshack.us/img204/4262/screen2phn.jpg
Otsikko: Re: Center menu
Kirjoitti: Sir Osis of Liver - heinäkuu 19, 2011, 03:02:11 IP
Can't see the problem - your board is in Maintenance mode.  You must have made a syntax error when you changed the code.  Attach the edited index.template.php so I can see what you did.


Don't see anything wrong in your screenshots, and the index template you're running now has the original navbar code, not the edit.  Can you take it out of maintenance mode?

Otsikko: Re: Center menu
Kirjoitti: lendario - heinäkuu 19, 2011, 03:18:20 IP
I posted some screens for you to see.

I just put the code you asked me  :'(
Otsikko: Re: Center menu
Kirjoitti: Sir Osis of Liver - heinäkuu 19, 2011, 03:23:55 IP

Take your forum out of maintenance mode.

Otsikko: Re: Center menu
Kirjoitti: lendario - heinäkuu 19, 2011, 03:36:33 IP
Ready
Otsikko: Re: Center menu
Kirjoitti: Sir Osis of Liver - heinäkuu 19, 2011, 03:46:41 IP
Ok, I see it.  You're running the original template_menu code, not the centering edit, and it is correct and displays correctly.  There are two possible causes for the problem:

1 - The shoutbox code you added just below the template_menu code is screwing things up.  Comment it out and see what happens.

2 - You edited something in BoardIndex.template.php or installed a mod that changed it.


Otsikko: Re: Center menu
Kirjoitti: lendario - heinäkuu 19, 2011, 03:51:54 IP
Look man, everything was normal, I've had a chat before the change to centralization, but when I put the code gave it, so I took the code and was still the same.

I am the Necromancer that I did not change anything beyond the code-centricity index.template.php

Ja uninstall the chatbox and it's still the same.
Otsikko: Re: Center menu
Kirjoitti: Sir Osis of Liver - heinäkuu 19, 2011, 04:00:10 IP
index.template.php is displaying correctly - it is identical to an earlier version of the template that I have from your board, except for the shoutbox.  The problem is in BoardIndex.template.php, which displays everything between the header and footer. 

Is the shoutbox added by installing a mod?

Have you tried uploading a clean BoardIndex.template.php?



I'm able to duplicate the problem in Silent Wave by running you're index.template.php.  Stand by - I'll go through the code again......





Otsikko: Re: Center menu
Kirjoitti: lendario - heinäkuu 19, 2011, 04:06:21 IP
I installed mod from its own chat without any further modification.
I just sent a BoardIndex.template.php clean but still the same, nothing has changed.
Otsikko: Re: Center menu
Kirjoitti: Sir Osis of Liver - heinäkuu 19, 2011, 04:14:34 IP
   OK, lendario, here it is -

At the top of index.template.php, you did this:



f<?php
/**
 * Simple Machines Forum (SMF)




Change it back to this:



<?php
/**
 * Simple Machines Forum (SMF)



Otsikko: Re: Center menu
Kirjoitti: lendario - heinäkuu 19, 2011, 04:20:52 IP
Krash. Many apologies guy  :-[
I'm even embarrassed about it, excuse yourself. :-\

Now is working perfectly thank you and apologize again. ;)
Otsikko: Re: Center menu
Kirjoitti: Sir Osis of Liver - heinäkuu 19, 2011, 04:41:12 IP
Interesting example of a simple mistake having an unpredictable effect.  Glad I could help.

Forum looks good.