CSS BASIC | ||
CSS:
h1 {font-family: Georgia, sans-serif;} |
||
CSS: For Body Tag body {margin: 20px;} |
||
CSS: For Combine Elements
h1, h2, h3, h4, h5, h6 { |
||
CSS: FOR Comments /* This is a comment */ |
||
CSS: FOR Create Class
.container{ HTML: FOR Call CSS Class
<div class="container"> |
||
CSS: FOR Create ID
#container{ HTML: FOR Call CSS ID
<div ID="container"> |
||
CSS SELECTORS | ||
There are many different types of CSS selector that allow you to target rules to specific elements in an HTML document. CSS selectors are case sensitive, so they must match element names and attribute values exactly. Universal Selector Applies to all elements in the document Type Selector Matches element names Class Selector Matches an element whose class attribute has a value that matches the one specified after the period (or full stop) symbol ID Selector Matches an element whose id attribute has a value that matches the one specified after the pound or hash symbol. Child Selector Matches an element that is a direct child of another Descendant Selector Matches an element that is a descendent of another specified element (not just a direct child of that element) Adjacent Sibling Selector Matches an element that is the next sibling of another. General Sibling Selector Matches an element that is a sibling of another, although it does not have to be the directly preceding element. |
||
MIN-WIDTH AND MAX-WIDTH , MIN-HEIGHT AND MAX-HEIGHT | ||
By using max-width and min-width , size of website can be easily adjust according to browser width size. CSS: td.text { Call in HTML Code: <td class="text">Call text css in td of table to manage text in td according to screen size.</ td> |
||
By using max-height and min-height, size of website can be easily adjust according to browser height. CSS: p { Call in HTML Code: <p>Call this css implicitly when using p tag and adjust their height.</ p> |
||
INHERITANCE | ||
If you specify the font-family or color properties on the <body> element, they will apply to most child elements. This is because the value of the font-family property is inherited by child elements. CSS:
Call in HTML Code:
|
||
CSS FOR FOREGROUND COLOR | ||
The color property allows you to specify the color of text inside an element. CSS:
|
||
CSS FOR BACKGROUND COLOR | ||
CSS treats each HTML element as if it appears in a box, and the background-color property sets the color of the background for that box. CSS:
|
||
CSS FOR OPACITY | ||
CSS3 introduces the opacity property which allows you to specify the opacity of an element and any of its child elements. The value is a number between 0.0 and 1.0 (so a value of 0.5 is 50% opacity and 0.15 is 15% opacity). CSS:
|
||
CSS FOR MARGIN | ||
CSS: BASIC FORMAT
There are Three choices of values for the margin property. |
||
CSS FOR PADDING | ||
Padding is the Space between the border of an HTML element and the content within it. It is just like Margin but there is no "auto" value, and negative values cannot be declared for padding. CSS: BASIC FORMAT
There are Two choices of values for the Padding property. |
||
CSS FOR TEXT PROPERTIES | ||
Text is important part of website so we must manage text using css. Text contain following properties:
∗ Color CSS: Color
color: value; CSS: Letter Spacing
letter-spacing: value; CSS: Text Align
text-align: value; CSS: Text Decoration
text-decoration: value; CSS: Text Indent
text-indent: value; CSS: Text Transform
text-transform: value; CSS: White Space
white-space: value; CSS: Word Spacing
word-spacing: value; |
||
CSS FOR FONT PROPERTIES | ||
Font is important part of website so we must manage Font of text using css. Font contain following properties:
∗ Font CSS: Font
General formate of font: CSS: Font-Family
Font-Family: value; CSS: Font Size
Font Size: value; CSS: Font Style
font style: value; CSS: Font Variant
font variant: value; CSS: Font Weight
font weight: value; |
||
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment