Mind blowing SEO improving and Google rank increasing Signature Rotator SEO Tool.


How to assign multiple classes to an element using CSS?

destroyer Offline referral

Posts: 430
Joined: Jul 2013
Reputation: 3

Senior Member
Sorry for such a simple question but I am still learning CSS code, now I know what CSS class is and how to use it more or less but how do I assign more than one class to an element in this case I am trying to add class to div?

PHP Code:
<div class="container">
div class="multiple class">My HTML code</div>

multiple class is where I need to add more than one class!
surenot Offline referral

Posts: 500
Joined: Jan 2014
Reputation: 16

Senior Member
To assign more than one css class to an element simply separated them with space like this:

class="class1 class2"

Then in your css style-sheet use

.class1 .class2 {css style}


.class2 {css style}

User(s) browsing this thread: 1 Guest(s)