The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Post background effect/coloring

+2
Ryanette
axiom
6 posters

Go down

Post background effect/coloring Empty Post background effect/coloring

Post by axiom April 13th 2012, 10:52 pm

Alright so I followed this tutorial to color a staff accounts post background, Coloring a Posts Background

It is fine but a I want it to look different, basically all it does is just change the background's color, like this:
Code:
$(function() {
$('tr.post:has(".specialpost2") td').css('background-color','#15120D');
});

but I was wanting to know instead of just straight up changing the color of the background is there a way to change the "Hue and Saturation" of the posts background to give a better blended look, not just a solid color like #186111.


Last edited by axiom on April 13th 2012, 11:12 pm; edited 1 time in total
avatar
axiom
Forumember

Posts : 29
Reputation : 1
Language : english

Back to top Go down

Post background effect/coloring Empty Re: Post background effect/coloring

Post by Guest April 13th 2012, 10:59 pm

avatar
Guest
Guest


Back to top Go down

Post background effect/coloring Empty Re: Post background effect/coloring

Post by axiom April 13th 2012, 11:09 pm

I meant can I add a code to this:

Code:
$(function() {
$('tr.post:has(".specialpost2") td').css('background-color','#15120D');
});

to make it look better, so I want the code, if possible to look something like this:

Code:
$(function() {
$('tr.post:has(".specialpost2") td').css('background-color','#15120D');
$('tr.post:has(".specialpost2") td').css('hue','50');
$('tr.post:has(".specialpost2") td').css('saturation','150');
});
avatar
axiom
Forumember

Posts : 29
Reputation : 1
Language : english

Back to top Go down

Post background effect/coloring Empty Re: Post background effect/coloring

Post by Ryanette April 14th 2012, 1:08 am

Hmmm... You could be more efficient!

$(function() {
$('tr.post:has(".specialpost2") td').css('background-color:','#15120D',hue','50''saturation','150');
});
Ryanette
Ryanette
Forumember

Male Posts : 135
Reputation : 2
Language : English (British)
Location : England, United Kingdom

http://www.devforumz.com

Back to top Go down

Post background effect/coloring Empty Re: Post background effect/coloring

Post by axiom April 14th 2012, 1:30 am

didnt work Sad
avatar
axiom
Forumember

Posts : 29
Reputation : 1
Language : english

Back to top Go down

Post background effect/coloring Empty Re: Post background effect/coloring

Post by LGforum April 14th 2012, 1:55 am

*sigh* People need to look into using the jQuery CSS function more.

In order to set multiple CSS properties you must pass in an object literal like so:
Code:

$(function(){
$('tr.post:has(".specialpost2") td').css({
  'background-color' : '#15120D',
  'hue' : '50',
  'saturation' : '150'
});
});
LGforum
LGforum
Hyperactive

Male Posts : 2265
Reputation : 264
Language : English
Location : UK

Back to top Go down

Post background effect/coloring Empty Re: Post background effect/coloring

Post by oisdjoiw April 14th 2012, 3:15 am

Member Banned ~ Content Removed. (slg)
avatar
oisdjoiw
New Member

Posts : 5
Reputation : 1
Language : dfgfdger

Back to top Go down

Post background effect/coloring Empty Re: Post background effect/coloring

Post by axiom April 14th 2012, 6:03 am

@LGforum

It is only changing the background color Sad the hue and saturation isn't working
avatar
axiom
Forumember

Posts : 29
Reputation : 1
Language : english

Back to top Go down

Post background effect/coloring Empty Re: Post background effect/coloring

Post by Guest April 14th 2012, 2:45 pm

In CSS don't exist hue or staturation. You can use only transparency, with opacity proprety.
avatar
Guest
Guest


Back to top Go down

Post background effect/coloring Empty Re: Post background effect/coloring

Post by axiom April 15th 2012, 7:58 am

hm
avatar
axiom
Forumember

Posts : 29
Reputation : 1
Language : english

Back to top Go down

Post background effect/coloring Empty Re: Post background effect/coloring

Post by XDirect12345 April 19th 2012, 9:30 pm

gradient is not working for me. Mad
XDirect12345
XDirect12345
Forumember

Male Posts : 361
Reputation : 3
Language : English

http://xdirect12345.forummotion.com

Back to top Go down

Post background effect/coloring Empty Re: Post background effect/coloring

Post by xxangel17xx April 27th 2012, 7:41 am

You have posted a copyrighted tutorial. Posting copyrighted things equals a warning.
xxangel17xx
xxangel17xx
Forumember

Male Posts : 28
Reputation : 0
Language : english
Location : uk

http://www.craftreborn.net

Back to top Go down

Post background effect/coloring Empty Re: Post background effect/coloring

Post by Ryanette April 27th 2012, 1:08 pm

" Posting copyrighted things equals a warning." "Things!?" > 'Material'
Ryanette
Ryanette
Forumember

Male Posts : 135
Reputation : 2
Language : English (British)
Location : England, United Kingdom

http://www.devforumz.com

Back to top Go down

Post background effect/coloring Empty Re: Post background effect/coloring

Post by xxangel17xx April 27th 2012, 4:56 pm

what copyright did i post?
i didnt use any ones tutoirial i sat for houres trying to think how to do it since all you dumb support staff couldn't give the right tut on how to do it so remove my warning and put my posts back
check your facts your not the only one that knows Java & css you know
xxangel17xx
xxangel17xx
Forumember

Male Posts : 28
Reputation : 0
Language : english
Location : uk

http://www.craftreborn.net

Back to top Go down

Post background effect/coloring Empty Re: Post background effect/coloring

Post by LGforum April 27th 2012, 11:53 pm

@xxangel17xx: Sat for hours and came out with the same 3 line code? Bravo.

Anyway regarding the topic author, you'll see in this topic: https://help.forumotion.com/t107808-gradient-background-for-staff
Rideem has explained things well, and you may find the addClass method a lot easier due to being able to control things directly from the css.
LGforum
LGforum
Hyperactive

Male Posts : 2265
Reputation : 264
Language : English
Location : UK

Back to top Go down

Back to top

- Similar topics

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