0

How do i creat different ( divs) in one (div) with different classes?

am learning programming the first time

4th Nov 2019, 4:53 AM
Sy Mo
Sy Mo - avatar
4 Réponses
+ 1
For what language? For html it's <div class=" classone classtwo"></div> And the css for selecting these elements would be .classone .classtwo{ : ; } look at css diner AND READ the right hand side of the exercises to learn css selectors in detail
4th Nov 2019, 5:02 AM
Lorecan de Robillard
Lorecan de Robillard - avatar
+ 1
So to style an element that is both class1 and class2 there needs to be a space between the classes in the div class=" "... If you want to style two separate classes the same way, then its class1,class2 ie: the comma is like saying class1 and class2. if you actually go and READ css diner selectors (Google it) then you'll understand selectors better
4th Nov 2019, 5:24 AM
Lorecan de Robillard
Lorecan de Robillard - avatar
+ 1
If you mean to nest multiple <div> with different classes in a particular <div>, then you can easily do this: <div class="outer-div"> <div class="inner-div1"></div> <div class="inner-div2"></div> <div class="inner-div3"></div> </div> <!-- outer-div --> Assuming you have the CSS classes set. The term "nest" is commonly used to describe a means for placing single/multiple stuff within another, just like there can be a single bird or multiple birds in a bird nest.
4th Nov 2019, 6:38 AM
Ipang
0
but throw more light please
4th Nov 2019, 5:18 AM
Sy Mo
Sy Mo - avatar