You are viewing our Forum Archives. To view or take place in current topics click here.
CSS | adding more attributes HELP
Posted:

CSS | adding more attributes HELPPosted:

Kaizala
  • V5 Launch
Status: Offline
Joined: Jul 21, 201211Year Member
Posts: 248
Reputation Power: 460
Status: Offline
Joined: Jul 21, 201211Year Member
Posts: 248
Reputation Power: 460
Hello I am trying to learn CSS. In my body I have <p> text </p>.
In my style I have defined p and put attributes to it.

I want to make another p and define other attributes.

How do I do it?
#2. Posted:
Jerbo06
  • V5 Launch
Status: Offline
Joined: Apr 16, 201113Year Member
Posts: 570
Reputation Power: 48
Status: Offline
Joined: Apr 16, 201113Year Member
Posts: 570
Reputation Power: 48
You should put a class on both of them and add the attribute to that class.

example
[ Register or Signin to view external links. ]
#3. Posted:
Kaizala
  • Christmas!
Status: Offline
Joined: Jul 21, 201211Year Member
Posts: 248
Reputation Power: 460
Status: Offline
Joined: Jul 21, 201211Year Member
Posts: 248
Reputation Power: 460
OMG thank you sooo much! Been waiting all day for this. Thanks man!
#4. Posted:
zeusallmighty11
  • New Member
Status: Offline
Joined: Mar 28, 201410Year Member
Posts: 2
Reputation Power: 0
Status: Offline
Joined: Mar 28, 201410Year Member
Posts: 2
Reputation Power: 0
You should only use classes in CSS if you plan on using the class more than once. If not, use an id selector



#myDiv p
{
    color: red; /* This makes all paragraphs in #myDiv red */
}
Jump to:
You are viewing our Forum Archives. To view or take place in current topics click here.