My header.txt menu get's aligned left than centered in 2.0

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
MOB
Posts: 54
Joined: Sat May 10, 2008 9:51 am

My header.txt menu get's aligned left than centered in 2.0

Post by MOB »

Script URL: http://mixingonbeat.com/support
Version of script: 2.0
Hosting company: http://canaca.com
URL of phpinfo.php: http://mixingonbeat.com/phpinfo.php
URL of session_test.php: http://mixingonbeat.com/session_test.php
http://mixingonbeat.com/session_test2.php
What terms did you try when SEARCHING for a solution: Tried searching this sub-forum for help on this matter. But couldn't find a solution or at least a clear explanation.

Write your message below:
I recently upgraded to version 2.0. My problem is that now the content that I have in the header.txt file, get's sorted to the left. I have a menu above your software, that it should be aligned centered. But now it just gets aligned left. I am wondering if you could give me a tip to be able to get my menu back centered again?

Here is the code of my header.txt for you to review. Anything you can suggest would be highly appreciated.

Code: Select all

<table width="80%" cellspacing="0" cellpadding="0" border="0" align="center"> 

	<tr> 

		<td class="bodyline"><table width="100%" cellspacing="0" cellpadding="0" border="0">

			<tr> 

				<td>

				<p align="center"><a href="http://mixingonbeat.com/phpbb/index.php">

				<img src="http://mixingonbeat.com/phpbb/templates/DarkMOB/images/mob_logo.gif" border="0" alt="DJ Support Forum" vspace="1" width="100%" height="200" /></a></td></tr><tr>

				<td align="center" width="100%" valign="middle">

	<table width="100%" cellspacing="0" cellpadding="0" border="0">

	<tr>

            <td align="center" valign="top" nowrap="nowrap" height="15" background="http://mixingonbeat.com/phpbb/templates/DarkMOB/images/headbg.gif">

            <span class="mainmenu">

            <img src="http://mixingonbeat.com/phpbb/templates/DarkMOB/images/divider.gif" width="2" height="15" hspace="5" align="texttop">

            <a class="mainmenu" href="http://www.mixingonbeat.com/index.php">Home</a>&nbsp;

            <img src="http://mixingonbeat.com/phpbb/templates/DarkMOB/images/divider.gif" width="2" height="15" hspace="5" align="texttop">

            <a class="mainmenu" href="http://mixingonbeat.com/phpbb/index.php">Forum</a>&nbsp;

            <img src="http://mixingonbeat.com/phpbb/templates/DarkMOB/images/divider.gif" width="2" height="15" hspace="5" align="texttop">

            <a class="mainmenu" href="http://mixingonbeat.com/phpbb/faq.php">FAQ</a>&nbsp;

            <img src="http://mixingonbeat.com/phpbb/templates/DarkMOB/images/divider.gif" width="2" height="15" hspace="5" align="texttop">

            <a class="mainmenu" href="http://mixingonbeat.com/phpbb/memberlist.php">Memberlist</a>&nbsp;

            <img src="http://mixingonbeat.com/phpbb/templates/DarkMOB/images/divider.gif" width="2" height="15" hspace="5" align="texttop">

            <a class="mainmenu" href="http://mixingonbeat.com/phpbb/groupcp.php">Usergroups</a>&nbsp;

            <img src="http://mixingonbeat.com/phpbb/templates/DarkMOB/images/divider.gif" width="2" height="15" hspace="5" align="texttop">

            <a class="mainmenu" href="http://mixingonbeat.com/phpbb/listavatars.php">Member's Avatars</a>&nbsp;

            <img src="http://mixingonbeat.com/phpbb/templates/DarkMOB/images/divider.gif" width="2" height="15" hspace="5" align="texttop">

            <a class="mainmenu" href="http://mixingonbeat.com/phpbb/poll.php">Poll Overview</a>&nbsp;

            <img src="http://mixingonbeat.com/phpbb/templates/DarkMOB/images/divider.gif" width="2" height="15" hspace="5" align="texttop">

            <a class="mainmenu" href="http://mixingonbeat.com/phpbb/statistics.php">Statistics</a>&nbsp;

            <img src="http://mixingonbeat.com/phpbb/templates/DarkMOB/images/divider.gif" width="2" height="15" hspace="5" align="texttop"></span></td>

          </tr>

          <tr>

            <td align="center" valign="top" height="15" background="http://mixingonbeat.com/phpbb/templates/DarkMOB/images/headbg.gif">

            <span class="mainmenu">            

            <img src="http://mixingonbeat.com/phpbb/templates/DarkMOB/images/divider.gif" width="2" height="15" hspace="5" align="texttop">

			<a class="mainmenu" href="http://mixingonbeat.com/phpbb/links.php">Links</a>&nbsp; 

            <img src="http://mixingonbeat.com/phpbb/templates/DarkMOB/images/divider.gif" width="2" height="15" hspace="5" align="texttop">

            <a class="mainmenu" href="http://mixingonbeat.com/phpbb/referaf.php">Refer A Friend</a>&nbsp;

            <img src="http://mixingonbeat.com/phpbb/templates/DarkMOB/images/divider.gif" width="2" height="15" hspace="5" align="texttop">

            <a class="mainmenu" href="http://mixingonbeat.com/phpbb/viewforum.php?f=33">Tutorials</a>&nbsp;

            <img src="http://mixingonbeat.com/phpbb/templates/DarkMOB/images/divider.gif" width="2" height="15" hspace="5" align="texttop">

            <a class="mainmenu" href="http://mixingonbeat.com/vendors.html">Vendors Sign-Up</a>&nbsp;

            <img src="http://mixingonbeat.com/phpbb/templates/DarkMOB/images/divider.gif" width="2" height="15" hspace="5" align="texttop">

            <a class="mainmenu" href="http://mixingonbeat.com/phpbb/weblist.php">Weblist</a>&nbsp;

            <img src="http://mixingonbeat.com/phpbb/templates/DarkMOB/images/divider.gif" width="2" height="15" hspace="5" align="texttop">

            <a href="#" onclick="javascript:openRadioPopup();" class="mainmenu">

            <img src="http://mixingonbeat.com/phpbb/templates/DarkMOB/images/icon_mini_radio.gif" width="12" height="12" border="0" alt="Live Radio" hspace="3" />Live Radio</a>&nbsp;

            <img src="http://mixingonbeat.com/phpbb/templates/DarkMOB/images/divider.gif" width="2" height="15" hspace="5" align="texttop"></span></td>

          </tr>

          <tr>

            <td align="center" valign="top" height="15" background="http://mixingonbeat.com/phpbb/templates/DarkMOB/images/headbg.gif">

            <span class="mainmenu">

            <img src="http://mixingonbeat.com/phpbb/templates/DarkMOB/images/divider.gif" width="2" height="15" hspace="5" align="texttop"><a href="#" onclick="this.style.behavior='url(#default#homepage)'; this.setHomePage('www.mixingonbeat.com');">click here to set MOB as your HomePage</a>&nbsp;

            <img src="http://mixingonbeat.com/phpbb/templates/DarkMOB/images/divider.gif" width="2" height="15" hspace="5" align="texttop"></span></td>

          </tr>

        </table>

        </td>

      </tr>

    </table>

Klemen
Site Admin
Posts: 10142
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

Try adding <div align="center"> before yoru code and </div> after your code.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
MOB
Posts: 54
Joined: Sat May 10, 2008 9:51 am

Post by MOB »

Klemen wrote:Try adding <div align="center"> before yoru code and </div> after your code.
Unfortunately, it still doesn't work. Any other tips? I appreciate it.
Arno
Posts: 12
Joined: Mon Jan 26, 2009 11:25 pm

Post by Arno »

This is my header.txt file maybe this will help wou. I have align it to the center:

Code: Select all

<center>
<table>
<tr>
<td width="865" height="65"> //You can change it by your own wishes
<div align="center">
Here you header info or in your case your extra menu
</div>
</td>
</tr>
</table>
</center>
MOB
Posts: 54
Joined: Sat May 10, 2008 9:51 am

Post by MOB »

Arno, I appreciate your help. But unfortunately your code doesn't work for my menu. It does center the above image, but the menu doesn't get aligned center. Weird?
Arno
Posts: 12
Joined: Mon Jan 26, 2009 11:25 pm

Post by Arno »

That's strange, because at my site it works well. I have an flash movie as header content. Maybe that's the reason why it works at my site.
Henrie
Posts: 1095
Joined: Sun Aug 14, 2005 8:57 pm

Post by Henrie »

Hello DJ Andre

I don't know for certain if my solution goes well (i don't use hesk). But i have taken a look and it seems that all of hesk is enclosed in a table with class="enclosing"

In hesk_style.css is defined a global TD style with text-align: left;. This is the troublemaker because it is used for the whole page, not only for the hesk part of the page.

Change in hesk_style.css

Code: Select all

TD {
to

Code: Select all

table.enclosing td {
so that the defined TD style is only applied to the hesk part of the page.

It is always good to have a wrapper around the output. However in this case Klemen seems to have made a wrapper <div align="center">. Unfortunately it can't be called because it has no id or class assigned to it. But in this case to call the td it would still require the table to have a class or id assigned to it (like it is used now).

Greetings,
Henrie
I do not monitor the Gbook forums regularly anymore since I do not use the Gbook script myself anymore for a long time. But it helped me a lot in learning to understand php.
MOB
Posts: 54
Joined: Sat May 10, 2008 9:51 am

Post by MOB »

Henrie,

Thank you! That did it! That fixed my issue! Now my Menu is centered!

I changed in hesk_style.css

Code: Select all

TD {
to

Code: Select all

table.enclosing td {
cdcomptr
Posts: 1
Joined: Thu Jul 09, 2009 1:33 am

Since you guys are talking about header issues

Post by cdcomptr »

Since you guys are talking about header issues maybe you can help me I added a header via header txt but there is a gap between the bottom of header and body how can i get rid of this? you can take a look http://resell4somebucks.com/helpdesk
Henrie
Posts: 1095
Joined: Sun Aug 14, 2005 8:57 pm

Post by Henrie »

Hello cdcomptr

in your header.txt change

Code: Select all

<p align="center">
to

Code: Select all

<p align="center" style="margin-bottom:0;">
Greetings,
Henrie
I do not monitor the Gbook forums regularly anymore since I do not use the Gbook script myself anymore for a long time. But it helped me a lot in learning to understand php.
Post Reply