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 Centering Banner - 2.0 RC4

Started by tpet96, January 03, 2011, 08:58:59 AM

Previous topic - Next topic

tpet96

Having some issues trying to center my uploaded banner in 2.0 RC4.  I have it uploaded here:


http://www.ncogeo.com

I set this as my Default Logo through Configuration - Current Theme - Theme Settings - Logo Image Url

The banner is uploaded at: www.ncogeo.com/img/ncogbanner.gif

Any idea how to center this banner so it is directly over my menu at the top of the page?  Thanks in advance!

KT

Hi go to admin current theme >modify themes > edit themes style sheets >index.css
then look for your banner logo script and play with the width either by % or by center

hope this helps

KT

Mari-chi

Try adding this code to the end of your CSS, tpet:

h1.forumtitle img {
   width: 800px;
   height: 100px;
   margin: 0 auto;
}

tpet96

Mari-chi.....that didn't work.   Any other ideas?

Mari-chi

Hmm. Try this then:

h1.forumtitle img {
   text-align: center;
}

I forgot that the margin: 0 auto; would usually only work if you have text-align: center; as a property on your body selector. Try the above code and see how that works out for you.

tpet96


tpet96

Ok....figured it out.

index.template.php

Find:

echo !empty($settings['forum_width']) ? '
<div id="wrapper" style="width: ' . $settings['forum_width'] . '">' : '', '
   <div id="header"><div class="frame">
      <div id="top_section">


Immediately following add:


<div align="center"><a href="http://www.yourforum.com"><img src="http://www.yourforum.com/??.gif" alt="Your Forum ID" /></a></div>


I was just able to host the banner on our server and do away with the actual forum logo and put this in instead.  Worked like a charm!  Thanks for all the help!

Advertisement: