News:

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

Main Menu

Need help w/centering top image

Started by 57hotrodvw, May 31, 2005, 04:35:57 PM

Previous topic - Next topic

57hotrodvw

Hi all,

I'm using the 7Dana theme in my new SMF forum at http://www.speedshots.net/tvwdra/forum [nofollow] and am trying to figure how how to center the banner ("smflogo.jpg") at the top of the page.

I've modified the index.template.php file in a few different ways, but have not quite been able to get the result that I'm looking for.

When I added the larger than default smflogo.jpg image, it caused the table width to expand to be the width of the image plus the dark red cell to the right of it. Ideally, I'd like to table width to be 800 pix, and/or have the smflogo.jpg image centered on the the red background.

If nothing else, I can make the smflogo.jpg wider (to 800 pix), and get rid of the dark red cell in the table, but need some help w/editing the dark red cell properties/position.

Thanks!
--Eric


57hotrodvw

Here is the part of the index.template.php file that I've been modifying. If someone could help get rid of the top row of the table and use the banner all the way across, that would be cool too.

Quote
// The logo and the three info boxes.
   echo '
      <table cellspacing="0" cellpadding="5" border="0" align="center" width="100%" style="position: relative;">
         <tr>
            <td class="logo" valign="bottom" align="left" style="padding: 0px; white-space: nowrap;">';

   // This part is the logo and forum name.  You should be able to change this to whatever you want...
   echo '
               <img src="', $settings['images_url'], '/smflogo.jpg" style="float: left;" alt="" />
               </td>';
   echo '            
               <td class="logo" valign="bottom" align="right" style="padding: 5px; white-space: nowrap;">
               <span class="welcome">', $context[''], '</span>';

   echo '
            </td>
         </tr>
         <tr>
            <td colspan="2" valign="top" style="padding: 0px; white-space: nowrap;">';
            
   echo '   
      <table cellspacing="0" cellpadding="0" border="0"  width="100%">
         <tr>
            <td class="navigation">
            
      <a href="#" onclick="shrinkHeader(!current_header); return false;"><img id="upshrink" src="', $settings['images_url'], '/', empty($options['collapse_header']) ? 'upshrink.gif' : 'upshrink2.gif', '" alt="*" title="', $txt['upshrink_description'], '" style="margin: 2px 0;" border="0" /></a><img id="upshrinkTemp" src="', $settings['images_url'], '/blank.gif" alt="" style="margin-right: 2ex;" />';

      // Show the menu here, according to the menu sub template.
      template_menu();

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

[Unknown]

You should generally ask questions specific to a theme inside that theme's topic.

-[Unknown]

57hotrodvw

Quote from: [Unknown] on June 01, 2005, 02:26:53 AM
You should generally ask questions specific to a theme inside that theme's topic.

Thanks for the tip - will do so in the future.

Can anyone out there help me w/my question?

Advertisement: