Uutiset:

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

Main Menu
Advertisement:

How to center my graphic

Aloittaja KirkhamsEbooks, heinäkuu 27, 2011, 09:39:10 IP

« edellinen - seuraava »

KirkhamsEbooks

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

KirkhamsEbooks


greeneyes1119

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="$$$$$hxxp:tampamassage.biz/index.php?PHPSESSID=b03h2puc3lp73noniml7l4t3d7 [nonactive]">Be Relaxed and Pain Free Florida Massage Information Tampa St. Petersburg and Clearwater</a>

         </h1>
         <img id="upshrink" src="$$$$hxxp:tampamassage.biz/Themes/default/images/upshrink.png [nonactive]" alt="*" title="Shrink or expand the header." style="display: none;" />
         <img id="smflogo" src="$$$$hxxp:tampamassage.biz/Themes/default/images/smflogo.png [nonactive]" 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

Gary

^ 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>', '
Gary M. Gadsdon
Do NOT PM me unless I say so
War of the Simpsons
Bongo Comics Fan Forum
Youtube Let's Plays

^ YT is changing monetisation policy, help reach 1000 sub threshold.

greeneyes1119

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.

Gary

Don't worry about it. Keep practicing and learning, and you'll get it right.
Gary M. Gadsdon
Do NOT PM me unless I say so
War of the Simpsons
Bongo Comics Fan Forum
Youtube Let's Plays

^ YT is changing monetisation policy, help reach 1000 sub threshold.

Advertisement: