Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Aiheen aloitti: Dylert - marraskuu 03, 2013, 06:17:11 AP

Otsikko: Different color on poster info
Kirjoitti: Dylert - marraskuu 03, 2013, 06:17:11 AP
Hello! I'm trying to make another color for the profile/poster area in a post. When I change the background color it changes for both the whole post including the user area. Is there a way to fix this?

See attachment.

Here's my css code:

#forumposts .windowbg, #forumposts .windowbg2
{
border: 1px solid #979798;
border-radius: 12px 12px 12px 12px;;
background-color: #F8F8F8;
}

Otsikko: Re: Different color on poster info
Kirjoitti: Oldiesmann - marraskuu 03, 2013, 01:10:55 IP
You can fix that by editing Display.template.php for the theme you're using (or the default theme if the one you're using doesn't have that file).
Otsikko: Re: Different color on poster info
Kirjoitti: Dylert - marraskuu 03, 2013, 02:37:11 IP
Thank you, Oldiesman! What should I edit in Display.template.php?
Otsikko: Re: Different color on poster info
Kirjoitti: Sir Osis of Liver - marraskuu 03, 2013, 03:09:01 IP



// Show information about the poster of this message.
echo '
<div class="poster" style="background: red;">
<h4>';


Otsikko: Re: Different color on poster info
Kirjoitti: far2slow - marraskuu 03, 2013, 03:30:41 IP
or you can change it in the css

find

.poster{

add

background-color: #FF0000;  or what ever color you want

doing it this way will change the poster background color in pms also. if you don't want to do that then you can just add another class

<div class="poster posterbg">

then add this to your css

.postertbg{
background-color: #FF0000;
}

sorry Krash i just always would rather use css to do the style where i can.
Otsikko: Re: Different color on poster info
Kirjoitti: emanuele - marraskuu 03, 2013, 03:34:08 IP
You don't have to add another class to change the topics and not the PMs, you can just use:
#forumposts .poster
Otsikko: Re: Different color on poster info
Kirjoitti: far2slow - marraskuu 03, 2013, 03:36:03 IP
Lainaus käyttäjältä: emanuele - marraskuu 03, 2013, 03:34:08 IP
You don't have to add another class to change the topics and not the PMs, you can just use:
#forumposts .poster

good point emanuele  :) 
Otsikko: Re: Different color on poster info
Kirjoitti: Dylert - marraskuu 03, 2013, 05:46:50 IP
Thanks lot for the help, guys! New collor on profile field and a nice frame is made: http://hellasforum.net/index.php?topic=8213.0 :) :)