Simple Machines Community Forum

Customizing SMF => Graphics and Templates => Aiheen aloitti: KirkhamsEbooks - heinäkuu 27, 2011, 09:39:10 IP

Otsikko: How to center my graphic
Kirjoitti: KirkhamsEbooks - heinäkuu 27, 2011, 09:39:10 IP
http://tampamassage.biz/index.php?action=forum

Using 2.o RC5 I replaced the smf logo with this one, but I need to center it. How do I go about this?

Thanks

Rick
Otsikko: Re: How to center my graphic
Kirjoitti: KirkhamsEbooks - heinäkuu 28, 2011, 04:50:55 IP
Anyone know how to do this?
Otsikko: Re: How to center my graphic
Kirjoitti: greeneyes1119 - heinäkuu 29, 2011, 12:45:20 AP
Hi,
Here's what you need to do.

You will need to find the code where this part ends:

// ]]></script>
</head>
and this begins:

<center>
<body>
<div id="wrapper" style="width: 90%">
   <div id="header"><div class="frame">
      <div id="top_section">
         <h1 class="forumtitle">
            <a href="$$$$$http://tampamassage.biz/index.php?PHPSESSID=b03h2puc3lp73noniml7l4t3d7">Be Relaxed and Pain Free Florida Massage Information Tampa St. Petersburg and Clearwater</a>

         </h1>
         <img id="upshrink" src="$$$$http://tampamassage.biz/Themes/default/images/upshrink.png" alt="*" title="Shrink or expand the header." style="display: none;" />
         <img id="smflogo" src="$$$$http://tampamassage.biz/Themes/default/images/smflogo.png" alt="Simple Machines Forum" title="Simple Machines Forum" />
      </div></center>

You will also need to take out the $$$$$.

Your graphic should be centered after that, if not you may need to alter the template dimensions.

I added the <center> tags before and after.

I hope you get your desired result.

Good Luck with your site,
Josette
Otsikko: Re: How to center my graphic
Kirjoitti: Gary - heinäkuu 29, 2011, 12:57:44 AP
^ Wrong!

Not only is <center> deprecated, but you placed it in the wrong places making the code invalid.

In index.template.php find:

', empty($settings['site_slogan']) ? '<img id="smflogo" src="' . $settings['images_url'] . '/smflogo.png" alt="Simple Machines Forum" title="Simple Machines Forum" />' : '<div id="siteslogan" class="floatright">' . $settings['site_slogan'] . '</div>', '

Replace:

', empty($settings['site_slogan']) ? '<div style="text-align: center;"><img id="smflogo" src="' . $settings['images_url'] . '/smflogo.png" alt="Simple Machines Forum" title="Simple Machines Forum" /></div>' : '<div id="siteslogan" class="floatright">' . $settings['site_slogan'] . '</div>', '
Otsikko: Re: How to center my graphic
Kirjoitti: greeneyes1119 - heinäkuu 29, 2011, 10:23:37 IP
I apologize.
I don't know why I gave you HTML advice on a PHP coding question.
I am very sorry for that and thankful to the person who gave you the correct advice.
Otsikko: Re: How to center my graphic
Kirjoitti: Gary - heinäkuu 29, 2011, 11:43:40 IP
Don't worry about it. Keep practicing and learning, and you'll get it right.