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.

Post background effect/coloring

View previous topic View next topic Go down

Post background effect/coloring

Post by axiom on 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

axiom
Forumember

Posts : 29
Reputation : 1
Language : english

Back to top Go down

Re: Post background effect/coloring

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


Guest
Guest


Back to top Go down

Re: Post background effect/coloring

Post by axiom on 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');
});

axiom
Forumember

Posts : 29
Reputation : 1
Language : english

Back to top Go down

Re: Post background effect/coloring

Post by Ryanette on 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
Forumember

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

http://www.devforumz.com

Back to top Go down

Re: Post background effect/coloring

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

didnt work Sad

axiom
Forumember

Posts : 29
Reputation : 1
Language : english

Back to top Go down

Re: Post background effect/coloring

Post by LGforum on 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
Hyperactive

Male Posts : 2254
Reputation : 254
Language : English
Location : UK

http://www.avacweb.com/

Back to top Go down

Re: Post background effect/coloring

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

Member Banned ~ Content Removed. (slg)

oisdjoiw
New Member

Posts : 5
Reputation : 1
Language : dfgfdger

Back to top Go down

Re: Post background effect/coloring

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

@LGforum

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

axiom
Forumember

Posts : 29
Reputation : 1
Language : english

Back to top Go down

Re: Post background effect/coloring

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

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

Guest
Guest


Back to top Go down

Re: Post background effect/coloring

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

hm

axiom
Forumember

Posts : 29
Reputation : 1
Language : english

Back to top Go down

Re: Post background effect/coloring

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

gradient is not working for me. Mad

XDirect12345
Forumember

Male Posts : 361
Reputation : 3
Language : English

http://xdirect12345.forummotion.com

Back to top Go down

Re: Post background effect/coloring

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

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

xxangel17xx
Forumember

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

http://www.craftreborn.net

Back to top Go down

Re: Post background effect/coloring

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

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

Ryanette
Forumember

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

http://www.devforumz.com

Back to top Go down

Re: Post background effect/coloring

Post by xxangel17xx on 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
Forumember

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

http://www.craftreborn.net

Back to top Go down

Re: Post background effect/coloring

Post by LGforum on 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: http://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
Hyperactive

Male Posts : 2254
Reputation : 254
Language : English
Location : UK

http://www.avacweb.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