Simple Machines Community Forum

Customizing SMF => Graphics and Templates => Aiheen aloitti: daveb47 - kesäkuu 02, 2011, 07:01:16 AP

Otsikko: Margin at top,need more help
Kirjoitti: daveb47 - kesäkuu 02, 2011, 07:01:16 AP
My board is
http://pricedofftheroad.com/forum

I want to move theme of forum down so top part of background is showing to match homepage

http://pricedofftheroad.com/

Any one tell me how to do this please

SMF 2.0 RC5
Charcoal by Grumpy

Otsikko: Re: Margin at top
Kirjoitti: kat - kesäkuu 02, 2011, 07:20:37 AP
OUCH!

Can't view either page, I'm afraid...

LainaaTemplate Parse Error!
It seems something has gone sour on the forum with the template system. This problem should only be temporary, so please come back later and try again. If you continue to see this message, please contact the administrator.

You can also try refreshing this page.
Otsikko: Re: Margin at top
Kirjoitti: daveb47 - kesäkuu 02, 2011, 07:33:48 AP
i was trying to figure it out myself,also move time up a bit,but bit outof my depth i think lol

All working now
Otsikko: Re: Margin at top
Kirjoitti: kat - kesäkuu 02, 2011, 07:44:00 AP
This code's deprecated, now, apparently.

It still works, though. ;)

In the theme's index.template.php file, right after the opening body tag, try adding this, on a new line:

<center><img style="margin-top:6px" border="0" src="/Banner.gif" width="800" height="90" alt="Forum" title="Forum" /></a></center>

Obviously, you'll need to change margin, width, height, alt and title, to suit.

That code assumes that the banner is in the root of the forum and it's named "Banner.gif", which you can change, obviously.

That any use?

Or, have I got the wrong end of the stick?
Otsikko: Re: Margin at top
Kirjoitti: daveb47 - kesäkuu 02, 2011, 09:54:11 AP
Thanks k@,but not what i am trying to do.
I am trying to move complete forum down so it is positioned the same as wordpress is in homepage,with part of background showing above it and acting as banner.
Otsikko: Re: Margin at top
Kirjoitti: ARG01 - kesäkuu 02, 2011, 10:31:17 AP
It's as simple as making a margin change in index.css.

Find:
/* This division wraps the entire forum when a forum width is set. */
div#wrapper
{
margin: 0 auto;
padding: 10px 0;
min-width: 780px;
max-width: 2300px;
background: #101010;

}


Change to:
/* This division wraps the entire forum when a forum width is set. */
div#wrapper
{
margin: 60px auto;
padding: 10px 0;
min-width: 780px;
max-width: 2300px;
background: #101010;

}


and adjust the 60px to your liking.

;)
Otsikko: Re: Margin at top
Kirjoitti: daveb47 - kesäkuu 02, 2011, 11:41:21 AP
LainaaIt's as simple as making a margin change in index.css.

Its only simple if you know how lol ;D

Many thanks

Otsikko: Re: Margin at top
Kirjoitti: Gary - kesäkuu 02, 2011, 01:14:43 IP
ARG - That 60px would then be applied to all sides, so you'd have large amounts of empty space at the bottom. Which would be bad.

Instead, within the same class, add a margin-top: ##px; to it, (where ## is the value you want) and it should move downwards, without empty space at the bottom.

K@ - what is it with you and deprecated/invalid code? :P
Otsikko: Re: Margin at top
Kirjoitti: kat - kesäkuu 02, 2011, 02:45:23 IP
If it works, why worry?

My old MGB GT is deprecated.

Still better than many modern cars. ;)
Otsikko: Re: Margin at top
Kirjoitti: ARG01 - kesäkuu 02, 2011, 04:02:11 IP
Lainaus käyttäjältä: Gary - kesäkuu 02, 2011, 01:14:43 IP
ARG - That 60px would then be applied to all sides, so you'd have large amounts of empty space at the bottom. Which would be bad.

On my test site it seemed to work flawlessly. The 60px is for the top, the auto seems to handle sides and bottom spacing just fine. I had no empty space at the bottom and the sides remained just how they were with the standard, unchanged css.  ;)
Otsikko: Re: Margin at top
Kirjoitti: daveb47 - kesäkuu 05, 2011, 10:30:31 AP
Still having problems with this,had it working with pixel perfect theme,but theme itself was very buggy.
Using blackbox205 theme now,but eem to have a dark box covering header part of backgroung image.

background should be

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fpricedofftheroad.com%2Fforum%2FThemes%2Fblackbox205%2Fimages%2Ftheme%2F%2Fbackdrop.jpg&hash=19f3eb026730feb89dda958ac184168bdd7f7547)

But part with title isnt showing.

I have attached index.css

Thanx
Otsikko: Re: Margin at top,need more help
Kirjoitti: Madzgo - kesäkuu 05, 2011, 02:35:30 IP
Line 54,
replace the margin: 120px auto;
to - margin: 0 auto;


Then,
line 3501.
Add
padding-top: 100px; (or whatever suits you)

And thats it.
Otsikko: Re: Margin at top,need more help
Kirjoitti: daveb47 - kesäkuu 05, 2011, 03:34:26 IP
Made those changes,
updated index.css attached

But board has gone out if alignment with background.

Edit
Forgot to remove px from top edit,but had to remove

   padding: 0px 0 0 0;

from below second one

Many thanx for your help.

Otsikko: Re: Margin at top,need more help
Kirjoitti: Madzgo - kesäkuu 05, 2011, 03:39:30 IP
Because you didn't did what I told.

You deleted margin: 120px auto;
but you were supposed to place
margin: 0 auto;