Default value:
visible
Showing posts with label css. Show all posts
Showing posts with label css. Show all posts
Wednesday, 17 April 2013
Default value of display property
Default value:
inline
All CSS Pseudo Classes/Elements
All CSS Pseudo Classes/Elements
| Selector | Example | Example description |
|---|---|---|
| :link | a:link | Selects all unvisited links |
| :visited | a:visited | Selects all visited links |
| :active | a:active | Selects the active link |
| :hover | a:hover | Selects links on mouse over |
| :focus | input:focus | Selects the input element which has focus |
| :first-letter | p:first-letter | Selects the first letter of every <p> element |
| :first-line | p:first-line | Selects the first line of every <p> element |
| :first-child | p:first-child | Selects every <p> elements that is the first child of its parent |
| :before | p:before | Insert content before every <p> element |
| :after | p:after | Insert content after every <p> element |
| :lang(language) | p:lang(it) | Selects every <p> element with a lang attribute value starting with "it" |
padding property in css
The padding property can have from one to four values.
- padding:25px 50px 75px 100px;
- top padding is 25px
- right padding is 50px
- bottom padding is 75px
- left padding is 100px
- padding:25px 50px 75px;
- top padding is 25px
- right and left paddings are 50px
- bottom padding is 75px
- padding:25px 50px;
- top and bottom paddings are 25px
- right and left paddings are 50px
- padding:25px;
- all four paddings are 25px
margin property in css
The margin property can have from one to four values.
- margin:25px 50px 75px 100px;
- top margin is 25px
- right margin is 50px
- bottom margin is 75px
- left margin is 100px
- margin:25px 50px 75px;
- top margin is 25px
- right and left margins are 50px
- bottom margin is 75px
- margin:25px 50px;
- top and bottom margins are 25px
- right and left margins are 50px
- margin:25px;
- all four margins are 25px
Border Style
The border-style property can have from one to four values.
- border-style:dotted solid double dashed;
- top border is dotted
- right border is solid
- bottom border is double
- left border is dashed
- border-style:dotted solid double;
- top border is dotted
- right and left borders are solid
- bottom border is double
- border-style:dotted solid;
- top and bottom borders are dotted
- right and left borders are solid
- border-style:dotted;
- all four borders are dotted
Saturday, 23 February 2013
How to align text vertical center in div with css
display: table-cell;
vertical-align: middle;
#box {
height: 90px;
width: 270px;
background: #000;
font-size: 48px;
font-style: oblique;
color: #FFF;
text-align: center;
margin-top: 20px;
margin-left: 5px;
display: table-cell;
vertical-align: middle;
}
#wrapper {display:table;}
#cell {display:table-cell; vertical-align:middle;}
vertical-align: middle;
#box {
height: 90px;
width: 270px;
background: #000;
font-size: 48px;
font-style: oblique;
color: #FFF;
text-align: center;
margin-top: 20px;
margin-left: 5px;
display: table-cell;
vertical-align: middle;
}
#wrapper {display:table;}
#cell {display:table-cell; vertical-align:middle;}
Subscribe to:
Posts (Atom)