1Select an element with the ID "id" and the class "class":
2#id.class {
3}
4example:
5<div>
6 <strong id="id" class="class">
7 Foobar
8 </strong>
9 <strong class="class">
10 Foobar
11 </strong>
12</div>
13=> Will select the first <strong> element
14
15Select all elements with the class "class",
16which are decendents of a element with an ID of "id":
17#id .class {
18}
19example:
20<div id="id">
21 <strong class="class">Foobar</strong>
22</div>
23=> Will select the <strong> element
1.myclass {
2 border:1px solid black;
3 background-color: #d2d2d2;
4 height:20px;
5 width:60px;
6}
7/*If you give this class to a div in html, it will get the styles you gave
8to that class. You can add multiple classes to a div, and multiple divs
9can get that class. */
10/* I hope I helped! */
1/*put a # infront of the id*/
2/*<section id="example"></section>*/
3#example{
4 margin: auto;
5}