The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Editing post colors via Javascript - Won't work now

View previous topic View next topic Go down

Solved Editing post colors via Javascript - Won't work now

Post by MDillon on March 7th 2014, 6:03 am

So, yesterday, I stumbled upon this thread...http://help.forumotion.com/t127662-how-to-change-post-text-background-color-change

I followed the steps and they all worked like a charm. The code was perfect and didn't seem to slip up.

However, today, after changing a bit of the CSS (not much, just working on hovers)... the post color went back to normal and I can't seem to get the colors to work again.

This is bugging me... and I need help...

I have a Phpbb2 base, if you couldn't tell from the post or what not.

Thanks in advance!

MDillon
New Member

Posts : 6
Reputation : 1
Language : English

http://steadfast.betaboard.net

Back to top Go down

Solved Re: Editing post colors via Javascript - Won't work now

Post by masesm on March 7th 2014, 6:49 am

Check and see if you have these variables used anywhere other than the script provided by Ange:

Code:
td.row1.jaune-post:nth-child(2),td.row2.jaune-post:nth-child(2){
background:#f0f0f0 url('http://i56.servimg.com/u/f56/18/21/60/73/jaune10.png') repeat-y
}
td.row1.vert-post:nth-child(2),td.row2.vert-post:nth-child(2){
background:#f0f0f0 url('http://i56.servimg.com/u/f56/18/21/60/73/vert10.png') repeat-y
}

masesm
Forumember

Male Posts : 67
Reputation : 5
Language : English, Java, JavaScript, HTML, CSS.
Location : United States

http://sicktier.forumotion.com/

Back to top Go down

Solved Re: Editing post colors via Javascript - Won't work now

Post by MDillon on March 7th 2014, 8:43 am

Sadly, I did not put this code anywhere else. I didn't even mess with any code like it. I only edited the CSS and Javascript... I still can't figure it out...

MDillon
New Member

Posts : 6
Reputation : 1
Language : English

http://steadfast.betaboard.net

Back to top Go down

Solved Re: Editing post colors via Javascript - Won't work now

Post by Ange Tuteur on March 7th 2014, 6:50 pm

Hello MDillon,

I have check your CSS and you're making the selectors invalid by placing 2 slashes a text before it.

Example :
Code:
//END CHATBOX td.row1.jaune-post:nth-child(2), td.row2.jaune-post:nth-child(2) {
background:#f0f0f0 url(http://i62.tinypic.com/dr436u.png) repeat-y
}

That is commonly a single line comment for languages like javascript. This is NOT supported in CSS. Instead you must write comments as :
Code:
/* THIS IS A COMMENT */
td.row1.jaune-post:nth-child(2), td.row2.jaune-post:nth-child(2) {
background:#f0f0f0 url(http://i62.tinypic.com/dr436u.png) repeat-y
}

Review your CSS and edit the single line comments to fix any errors.

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: Editing post colors via Javascript - Won't work now

Post by MDillon on March 7th 2014, 8:11 pm

Thank you very much! I'm so used to using comments in my coding that I didn't realize that it doesn't work on CSS... Simple mistake, but thank you! Smile

MDillon
New Member

Posts : 6
Reputation : 1
Language : English

http://steadfast.betaboard.net

Back to top Go down

Solved Re: Editing post colors via Javascript - Won't work now

Post by Ange Tuteur on March 7th 2014, 9:56 pm

You're welcome I love you

Topic solved and archived

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum