Simple Machines Community Forum

Customizing SMF => Graphics and Templates => Aiheen aloitti: bellrosk - elokuu 12, 2011, 05:43:27 IP

Otsikko: Putting the logo outside the main wrapper?
Kirjoitti: bellrosk - elokuu 12, 2011, 05:43:27 IP
Basically I'd like to have my logo centralised above the main wrapper and have the forum below it Like in this image (http://i55.tinypic.com/noyp3l.png) - the floral bar would be the body background and the large gray box would be the forum wrapper).

Unfortunately due to the coding of the software if I place anything outside of the wrapper I get errors. Could anybody help me out? Sorry if I wasn't clear, I can explain further if you'd like.
Otsikko: Re: Putting the logo outside the main wrapper?
Kirjoitti: Hj Ahmad Rasyid Hj Ismail - elokuu 12, 2011, 05:55:32 IP
Lainaus käyttäjältä: bellrosk - elokuu 12, 2011, 05:43:27 IP
Basically I'd like to have my logo centralised above the main wrapper and have the forum below it Like in this image (http://i55.tinypic.com/noyp3l.png) - the floral bar would be the body background and the large gray box would be the forum wrapper).
Sure. It is very much possible.
Lainaus käyttäjältä: bellrosk - elokuu 12, 2011, 05:43:27 IP
Unfortunately due to the coding of the software if I place anything outside of the wrapper I get errors. Could anybody help me out? Sorry if I wasn't clear, I can explain further if you'd like.
Don't blame the existing code. It might be just the way you coded it.

This is how I would do:
Find:
function template_body_above()
{
global $context, $settings, $options, $scripturl, $txt, $modSettings;

Replace with:
function template_body_above()
{
global $context, $settings, $options, $scripturl, $txt, $modSettings;

// Here is where I add new top item. Just define its styles in index.css
echo '
<div id="topheader"></div>';
Otsikko: Re: Putting the logo outside the main wrapper?
Kirjoitti: bellrosk - elokuu 12, 2011, 06:00:13 IP
Lainaus käyttäjältä: bellrosk - elokuu 12, 2011, 05:43:27 IP
Unfortunately due to the coding of the software if I place anything outside of the wrapper I get errors. Could anybody help me out? Sorry if I wasn't clear, I can explain further if you'd like.
Don't blame the existing code. It might be just the way you coded it.
[/quote]

Most likely :) Everything I've tried thus far has resulted in errors, do you have a suggestion on how to achieve it?
Otsikko: Re: Putting the logo outside the main wrapper?
Kirjoitti: Hj Ahmad Rasyid Hj Ismail - elokuu 12, 2011, 06:01:14 IP
I've described them in the earlier post.
Otsikko: Re: Putting the logo outside the main wrapper?
Kirjoitti: bellrosk - elokuu 12, 2011, 06:21:43 IP
Worked a treat, thanks :)
Otsikko: Re: Putting the logo outside the main wrapper?
Kirjoitti: Hj Ahmad Rasyid Hj Ismail - elokuu 12, 2011, 06:24:54 IP
You're welcome.
Otsikko: Re: Putting the logo outside the main wrapper?
Kirjoitti: darren1981 - elokuu 13, 2011, 07:16:37 IP
yell out if you still need help... today is my first look at SMF but this was one of the first things i did, seems to be working well and allowed me to utilize the header section a little more.