CSS position:
Absolute positioning
HTML:
CSS:
CSS after and clearfix:
// This will add 'Sample text' after each p element
// It also can be p:after, but :: is a CSS 3 syntax
// Fixing parent container height, when using inner elements with float:right/left
CSS Triangle:
CSS background:
Absolute positioning
HTML:
<div class="container"> <div class="innter-container"> </div> </div>
CSS:
.container { position: relative; }
.inner-container { position: absolute }
CSS after and clearfix:
// This will add 'Sample text' after each p element
// It also can be p:after, but :: is a CSS 3 syntax
p::after {
content: 'Sample text';
}
// Fixing parent container height, when using inner elements with float:right/left
.container::after {
content: '.';
display: block;
height: 0;
clear: both;
}
CSS Triangle:
width: 0; height: 0; border-top: 10px solid #000; border-left: 10px solid transparent; border-right: 10px solid transparent;
CSS background:
background-image: url(path_to_img), url(path_to_2_img); background-repeat: no-repeat, repeat;
No comments:
Post a Comment