Simple Machines Community Forum

Customizing SMF => Graphics and Templates => Aiheen aloitti: Barlos - elokuu 04, 2011, 02:37:25 AP

Otsikko: Change profile background color
Kirjoitti: Barlos - elokuu 04, 2011, 02:37:25 AP
Hello,

How can I change the background color for profile, so, it is different to the post.

I found a similar post, but, it doesn't seem to work with SMF 2.0

Changing background color of profile area next to posts
http://www.simplemachines.org/community/index.php?topic=333882.0

Can anyone help?
Otsikko: Re: Change profile background color
Kirjoitti: Ricky. - elokuu 04, 2011, 02:42:59 AP
In main css file look for class  "poster" .

You need to modify that class..
Otsikko: Re: Change profile background color
Kirjoitti: Barlos - elokuu 04, 2011, 04:10:11 AP
Hello Ricky.,

The default css file is at: \smf2_root\Themes\default\css\index.css

Orignal code I found as the following:

.poster
{
float: left;
width: 15em;
}


I added "background " to it.

.poster
{
float: left;
width: 15em;
background: #ff0000;
}


Then give me the following look :


What should I do to make the color all the way down? like your post?

Thanks for the hint.

Best Regards
Otsikko: Re: Change profile background color
Kirjoitti: Ricky. - elokuu 04, 2011, 05:46:01 AP
Well, it may not cover whole. Still you can add :
min-height:200px
Otsikko: Re: Change profile background color
Kirjoitti: Barlos - elokuu 04, 2011, 09:02:38 AP
Dear Ricky.

Can you post your css code?

Best Regards
Otsikko: Re: Change profile background color
Kirjoitti: Barlos - elokuu 04, 2011, 09:12:38 IP
I tried and there is a problem.

If I use "min-height:200px;" then it occupied 200px of screen resolution space. If I set to 500px, it will  occupied 500px, even the post doesn't contain that long.

Please see the following displayed image.
Otsikko: Re: Change profile background color
Kirjoitti: Akyhne - elokuu 05, 2011, 11:31:51 IP
You can do it the opposite way by painting the .post_wrapper (red), then the .postarea & ..moderatorbar blue.

I did it in one of my themes (http://custom.simplemachines.org/themes/index.php?action=profile;u=144421).

Something like:
.post_wrapper {
    background-color: red;
    float: left;
    width: 100%;
}
.postarea, .moderatorbar {
    background: blue;
    margin: 0 0 0 16em;
    overflow: hidden;
}

You also need to tweak paddings etc.
Otsikko: Re: Change profile background color
Kirjoitti: Barlos - elokuu 09, 2011, 09:19:49 IP
Thankx Akyhne

I though the modified would only required one line...