News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Centering Header

Started by TroyG, September 04, 2008, 02:58:01 PM

Previous topic - Next topic

TroyG

I tried

</head>
<body>';

echo '<center><img src="http://www.ultimateaircooled.com/imagefolder/newforumheader.jpg" usemap="#Banner" alt="" style="border-style:none" /></center>';

   // The logo, user information, news, and menu.
   echo '
   <table cellspacing="0" cellpadding="0" border="0" align="center" width="95%" class="tborder">
      <tr style="background-color: #ffffff;">
         <td valign="middle" align="left"><img src="', !empty($settings['header_logo_url']) ? $settings['header_logo_url'] : $settings['images_url'] . '/smflogo.gif', '" alt="" /></td>
         <td valign="middle">';


It stills is to the left

ccbtimewiz

Link to site? I don't see this code on your site.

kat

Yeah, sorry. The usemap bit's superfluous. You don't need that.

<center><img src="http://www.ultimateaircooled.com/imagefolder/newforumheader.jpg"></center>';

should be enough.


ccbtimewiz

Are you talking about your logo? If that's true, you need to fix the rowspan. I don't see any other image code in the header.

TroyG

Yes sir , all I want is this centered on the header.....


ccbtimewiz

Oh I see now. What Kat was pointing out was something you didn't need to edit at all.

Open index.template.php

Find:
echo '
<div class="tborder" ', $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' style="width: 100%;"' : '', '>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="catbg" height="32">';

if (empty($settings['header_logo_url']))
echo '
<span style="font-family: Verdana, sans-serif; font-size: 140%; ">', $context['forum_name'], '</span>';
else
echo '
<img src="', $settings['header_logo_url'], '" style="margin: 4px;" alt="', $context['forum_name'], '" />';

echo '
</td>
<td align="right" class="catbg">
<img src="', $settings['images_url'], '/smflogo.gif" style="margin: 2px;" alt="" />
</td>
</tr>
</table>';


Replace with:
echo '
<div class="tborder" ', $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' style="width: 100%;"' : '', '>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td colspan="2" align="center" class="catbg" height="32">';

if (empty($settings['header_logo_url']))
echo '
<span style="font-family: Verdana, sans-serif; font-size: 140%; ">', $context['forum_name'], '</span>';
else
echo '
<img src="', $settings['header_logo_url'], '" style="margin: 4px;" alt="', $context['forum_name'], '" />';

echo '
</td>
</tr>
</table>';

kat

Therein lies the pronlem. No ftp access, at the moment.

TroyG

So I do have to go in through the ftp or can I go in through ADMIN ?

ccbtimewiz

For edits to the default theme, it is required to go through FTP.

How do I use FTP? / What is FTP?

hayley2007

Thank you ccbtimewiz it works for me, ive been looking how to do this for ages. You really have made my day. *virtual hug*

Advertisement: