Is there a way to write this the short way..?

Anything questions related to styling should go in here.
Post Reply
Jaami
Posts: 38
Joined: Wed Nov 23, 2011 11:22 pm
Location: GER

Is there a way to write this the short way..?

Post by Jaami »

Hi,
so i have alot of this id`s: t1, t2, t3, t4 etc. in my code . Now i want to know if there is shorter way to define them in CSS, than what i do atm. #t1,#t2,#t3,#t4,#t5{ }

..something like #t1 to t50{ } ?
bowersbros
Posts: 534
Joined: Thu May 05, 2011 8:19 pm

Re: Is there a way to write this the short way..?

Post by bowersbros »

Do they all do the same thing?

If so, why not turn them into a class and reuse it?
I don't like to brag, but I wasn't circumcised. I was circumnavigated. ;)

Want to learn something new? Or maybe reinforce what you already know? Or just help out? Please subscribe to my videos: http://goo.gl/58pN9
Jaami
Posts: 38
Joined: Wed Nov 23, 2011 11:22 pm
Location: GER

Re: Is there a way to write this the short way..?

Post by Jaami »

it is a json script, and i dont know alot of it, so i tried it to do in css. but now the guy from where i got it, done it(turned them into a class) for me. :)
xtrapsp
Posts: 4
Joined: Fri Aug 24, 2012 11:23 pm

Re: Is there a way to write this the short way..?

Post by xtrapsp »

you could have done

[syntax=css]
t1, t2, t3, t4, t5 {

}
[/syntax]

OR

[syntax=css]

#t1 #t2 #t3 #t4 #t5 {

}[/syntax]

I'm pretty sure CSS carries it over like that
Post Reply