+ 14

can we specify more than one CSS class for any HTML element????

5th Jun 2017, 2:30 PM
arpithagowda
arpithagowda - avatar
10 ответов
+ 17
Sure. I.e <div class = "one two three fourclass"> </div>
5th Jun 2017, 2:35 PM
Maz
Maz - avatar
+ 13
Yes, you can specify more than one CSS class for any HTML element, below I will specify one for you to understand. <!--CSS File--> .photo { margin: 10px; padding: 5px; background: #FFF; float: right; border: 1px solid #E0E0E0; } .left { float: left; margin-right: 20px; } and this is the html tag below: <img src="images/lime.jpg" class="photo left" alt="Lime" width="250" height="188" />
5th Jun 2017, 2:40 PM
Awele Omeligwe
Awele Omeligwe - avatar
+ 13
tankieww all
5th Jun 2017, 3:54 PM
arpithagowda
arpithagowda - avatar
+ 4
we can add more than one classes to any html element by separating them with a space. for instance -> <p class="text-center colored">I am centrally aligned and colored</p> here , in the above example , I hve used two classes, first is "text-center" and second is "colored"...
5th Jun 2017, 2:38 PM
Shîvåm Kûmår Ðwïvëðî
Shîvåm Kûmår Ðwïvëðî - avatar
+ 4
We can infer that id for any element can only be one and no. for classes an element can use is Infinite
5th Jun 2017, 2:52 PM
Siddharth Saraf
+ 1
As many as you want
5th Jun 2017, 2:50 PM
Calviղ
Calviղ - avatar
+ 1
we can add as many we want...
6th Jun 2017, 5:44 AM
Ajinkya Kulkarni
Ajinkya Kulkarni - avatar
+ 1
yes you can specify multiple classes in one html element and this feature is one of the best for web developers
22nd Jun 2017, 3:25 AM
Shivam Gupta
Shivam Gupta - avatar
+ 1
yes we can ....i will write a web programme soon..may it will help you
24th Sep 2017, 6:42 AM
Prateek Soni
Prateek Soni - avatar
0
yes
6th Jun 2017, 10:14 AM
Tushar Goel
Tushar Goel - avatar