0
Difference between relative and absolute paths in css
I am a beginner in CSS.And I working with "div id's".I am so confused about this topic.can anyone explain clearly about these "div id" and "class" topics and also Difference between relative and absolute paths in css.
3 ответов
0
id must be unique for each element.
with class you can groups elements to set them same style
0
can you explain them with examples
0
.red{
background-color: #f00;
}
.text-green{
color:#0f0;
}
.text-white{
color:#fff;
}
<!--. HTML. -->
<div class="red text-white">
this text must be white
<p class="text-green">
Some text. And its green
</p>
</div>
<ul>
<li class="text-green">
im green
</li>
<li class="red">
red bg
</li>
</ul>