Css
Css
=>Types of css-
1 inline css
2.internal css
3. external css
4.import css.
--------------------------------------------------
c.css using class - example4.html.
example-
.block2{
margin: 20px;
font-size: 30px;
color: blue;
width: 150px;
float: left;
background: pink;
padding: 15px;
}
Note- if inside a page ,1 type of design required multiple times then use css
using class method
----------------------------------------------------
d.css using tag - example5.html.
example -
h1,h2,p,div {
font-style:italic;
}
-----------------------------------------------------
e. css using tag parent and child group - example6.html
example-
header ul li{
font-size: 25px;
color: blue;
display: inline-block;
padding: 20px;
}
------------------------------------------------------
f. css using tag attributes - example7.html
Example-
input[type="number"]
{
width: 350 px;
height: 300px;
font-size: 18px;
margin: 15px;
}
-------------------------------------------------------
--------------------------------------------------------------------------------
width- In 4 ways
->width:px;-it is fixed for all types of device.
background :red;
background-color:red;
background-color: rgb(100,80,50); -> /0 to 255 chars.
background-color: rgba(100,80,50,0.5); -> /0 to 9,0 is lowest brightness.
background-image:url("1,jpg");
background-image:linear gradient(red,green,blue); top to bottom
background-image:linear gradient(to left,red,green,blue);
background-image:linear gradient(to right,red,green,blue);
background-image:linear gradient(to top,red,green,blue);
Example:-
#bg1{background: blue;}
#bg2{background-color: green;}
#bg3{background-color:rgb(100,80,50);}
#bg4{background-color:rgba(100,80,50,0.5);}
#bg5 {background-image: url('2.jpg');background-size: 100% 100%;}
#bg6{background-image:linear-gradient(blue,red,black);}
#bg7{background-image:linear-gradient(to left,bluered,black);}
#bg8{background-image:linear-gradient(to right,blue,red,black);}
#bg9{background-image:linear-gradient(to top,blue,red,black);}
--------------------------------------------------------------------------------
------
->float -It convert free block level tag to inline tag.
--------------------------------------------------------------------------------
---
-> margin - it apply space outside of elements/tags.
margin:auto; - it align the tag in center of present area.
margin:30px; - it apply 30px gap from top,left,right,bottom.
margin-top:30px;
margin-bottom:30px;
margin-right:30px;
margin-left:30px;
margin-top left-right bottom:30px;Eg-mrgin:20px 40px 25px;
---------------------------------------------------------------------------
-> in- margin -
margin-top:30px;
margin-bottom:30px;
margin-right:30px;
margin-left:30px;
------------------------------------------------------------------------------
=>padding - it apply space inside of tags
- padding-top
- padding-left
-padding-right
-padding-bottom
--------------------------------------------------------------------------------
-----------
=>Border :-
Types of Border:- 9 types
->solid
->double
->dotted
->dashed
->inset
->outset
->groove
->ridge
Direction of Border=
->border-all side
border-top
border-left
border-right
border-bottom
================================================================================
=====