Tuesday, March 19, 2013

Using the .after pseudo-element clearfix a positioned div- css trick

0 comments
When you are using a div positioned content will not show outside the bounds of the container. using the following css we can clear this thing.
.container {
    display: inline-block;
}
.container:after {
    content: " ";
    display: block;
    height: 0;
    clear: both;
    overflow: hidden;
    visibility: hidden;
}
.container {
    display: block;
}
for internet browser using the following code


Read more...

Thursday, January 17, 2013

How to use " :before " and ":after" sector in CSS2

0 comments
The ::after" selector is mainly used to inserts content after the selected element or elements.
p:after
{
content:"..readmore";
} 
same way The ":before" is used for inserts content before the content of the selected elements or element.
p:before
{
content:"read this... ";
} 

Read more...

Tuesday, December 25, 2012

HTML 5 Footer sticker

0 comments
This is the modern way to create a footer sticker in HTML5 Use the following steps then you can create a "sticky footer". Open your CSS file and paste the following code
html {
    position: relative;
    min-height: 100%;
}
body {
    margin: 0 0 250px; 
/* Margin bottom is the footer height */
}
footer {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 250px;
    width: 100%;
}

The following code is the example of HTML5 site

    


    
    
Lorem ipsum...

Read more...
older post