CSS – CASCADING STYLE SHEET
Presentation Layer
HTML ELEMENT / CSS RULE
Property + Value = Rule
background-color : red;
CSS – CaseSensitive
COMMENT /* */
HOW TO USE CSS
Inline CSS
Internal CSS
External CSS
CSS SELECTOR
ELEMENT SELECTOR - Third Preference
ID SELECTOR - #idname - First Preference
CLASS SELECTOR - .classname – Second Preference
UNIVERSAL SELECTOR - * (Similar to body Element Selector)
GROUPING SELECTOR - add coma between different selectors and group them to apply the same css rule for all.
ID vs CLASS
Whatever class name applied to one tag we can use the same class name to multiple tags to put them in a same class.
Even though the same thing is applicable on id also ,practically we use only once the id name we never use the same id name for two different tags(id – identification purpose)
! important
First Preference -Inline CSS
Second Preference depend upon Cascading Rule.
!important will change the preference of the CSS Rule.
TEXT PROPERTY
text-align : left , right, center, justify;
text-transform: uppercase, lowercase, capitalize;
text-decoration: underline,overline,line-through;
SPACING
text-intend
line-height
word-spacing
line-spacing
LINK PROPERTY
a:link{
}
a:hover;
a:active;
a:visited
LIST PROPERTY
list-type-style : square,circle ,(upper,lower)roman,latin,alpha,greek
BOX MODEL
CONTENT
PADDING
BORDER
MARGIN
TRBL --- Top,Right,Bottom,Left.
Margin : TRBL
Padding : TRBL
For Border we can able to give only one size not TRBL
Model – Solid,Dotted,Grove
Border : Size Model Color; or Border-radius : Size;
SHADOW PROPERTY
text-shadow : 10px -6px 3px red;
box-shadow : -8px 10px 5px brown;
horizontal-offset vertical-offset blur-value color
OVERFLOW PROPERTY
overflow: visible; hidden; scroll; auto
Default : Visible;
SCROLL : create scroll bar for all
AUTO : Automatically create scroll bar only for required portion
DISPLAY PROPERTY
display : inline ; block ; inline-block;
block : helps to display inline element in block and its accept height and width
inline : helps to display block element in inline but it doesn’t accept height and width
inline-block: : helps to display block element in inline and it accept height and width
GRADIENT PROPERTY
Choose the style and color from the above the website.
It will automatically generate the CSS rule according to your selection ,just copy paste the CSS rule at required place
FONT & ICON PROPERTY
Fonts.google.com
Select the font which u like
Copy paste the link tag content in html- head portion
Copy paste the font-family CSS rule in style tag
Fontawsome.com
Generate your kit for fontawsome website and copy paste the script tag content in html- head portion
Select the icon which u need
Copy paste the icon’s HTML code.
Comments
Post a Comment