Results: 1580
Notes
  • Newest first
  • Oldest first
  • Newest first(All)
  • Oldest first(All)
.class1 .class2 h2{
    color: red;
}
Selects all
<h2>
elements within
.class2
that is a descendant of
.class1
element
by Valeri Tandilashvili
4 years ago
0
CSS
selectors
Learn CSS
1
div p {
  background-color: yellow;
}
Selects all
<p>
elements inside
<div>
elements
by Valeri Tandilashvili
4 years ago
0
CSS
selectors
CSS
1
<i style="display:block;clear:both"></i>
by Valeri Tandilashvili
4 years ago
0
CSS
selectors
1
.clearfix::after {
  content: "";
  clear: both;
  display: block;
}
Modern way of clearing floats
by Valeri Tandilashvili
4 years ago
0
CSS
pseudo-elements
CSS
1
Several ways to avoid Math calculations CODE
.main-inner div
1. Subtract padding & border from width https://youtu.be/qhiQGPtD1PQ?t=137 2. Add inner div with padding https://youtu.be/_Ai-_nZ6bw4?t=269 3. Use
box-sizing: border-box
property https://codepen.io/Tandilashvili/pen/yLeJvLO
by Valeri Tandilashvili
4 years ago
0
CSS
Learn CSS
1
#nav li {
    list-style: none;
    float: left;
    padding: 0 15px 0 0;
}
by Valeri Tandilashvili
4 years ago
0
CSS
Learn CSS
1
#body {
    background: url(../images/bg.jpg) top left repeat-y;
}
by Valeri Tandilashvili
4 years ago
0
CSS
Learn CSS
1
margin & padding properties work only horizontally on inline elements (like
span
,
a
). Solution -
display: inline-block;
or
display: block;
by Valeri Tandilashvili
4 years ago
0
CSS
Learn CSS
1
#header h1 {
    background: url(../images/bg.jpg) top left no-repeat;
    width: 702px;
    height: 100px;
    text-indent: -9999px;
}
by Valeri Tandilashvili
4 years ago
0
CSS
Learn CSS
1
When two margins are touching, the larger of the two margins is used
by Valeri Tandilashvili
4 years ago
0
CSS
Learn CSS
1
Results: 1580