SlideShare ist ein Scribd-Unternehmen logo
1 von 90
 Styles define how to display HTML elements
 Styles were added to HTML 4.0 to solve a
problem
 External Style Sheets can save a lot of work
 External Style Sheets are stored in CSS files
 The id selector is used to specify a style for a
single, unique element.
 The id selector uses the id attribute of the HTML
element, and is defined with a "#".
 The class selector is used to specify a style for a
group of elements. Unlike the id selector, the
class selector is most often used on several
elements.
 The class selector uses the HTML class attribute,
and is defined with a "."
 CSS background properties are used to define
the background effects of an element.
 CSS properties used for background effects:
 background-color
 background-image
 background-repeat
 background-attachment
 background-position
 Background Color
 body {background-color:#b0c4de;}
 Background Image:
 body {background-image:url('paper.gif');}
 Text Color
 The color property is used to set the color of
the text.
 body {color:blue;}
h1 {color:#00ff00;}
h2 {color:rgb(255,0,0);}
 direction :Specifies the text direction/writing direction
 letter-spacing: Increases or decreases the space between
characters in a text
 line-height: Sets the line height
 text-align: Specifies the horizontal alignment of text
 text-decoration: Specifies the decoration added to text
 text-indent: Specifies the indentation of the first line in a
text-block
 text-shadow: Specifies the shadow effect added
to text
 text-transform: Controls the capitalization of
text
 vertical-align: Sets the vertical alignment of an
element
 white-space: Specifies how white-space inside an
element is handled
 word-spacing: Increases or decreases the space
between words in a text
 CSS font properties define the font family,
boldness, size, and the style of a text.
 In CSS, there are two types of font family names:
 generic family - a group of font families with a
similar look (like "Serif" or "Monospace")
 font family - a specific font family (like "Times
New Roman" or "Arial")
 p{font-family:"Times New Roman", Times, serif;}
 Font Style
The font-style property is mostly used to
specify italic text.
 This property has three values:
 normal - The text is shown normally
 italic - The text is shown in italics
 oblique - The text is "leaning" (oblique is very
similar to italic, but less supported)
 p.normal {font-style:normal;}
 Font Size
 The font-size property sets the size of the text.
 Set Font Size With Pixels
 Setting the text size with pixels gives you full
control over the text size:
 h1 {font-size:40px;}
 Set Font Size With Em
 h1 {font-size:2.5em;} /* 40px/16=2.5em */
 Styling Links
 Links can be styled with any CSS property (e.g.
color, font-family, background, etc.).
 In addition, links can be styled differently
depending on what state they are in.
 The four links states are:
 a:link - a normal, unvisited link
 a:visited - a link the user has visited
 a:hover - a link when the user mouses over it
 a:active - a link the moment it is clicked
 a:link {color:blue;}
 Text Decoration
 The text-decoration property is mostly used
to remove underlines from links:
 Example
 a:link {text-decoration:none;}
a:visited {text-decoration:none;}
a:hover {text-decoration:underline;}
a:active {text-decoration:underline;}
 Background Color:
 The background-color property specifies the
background color for links:
 Example
 a:link {background-color:#B2FF99;}
a:visited {background-color:#FFFF85;}
a:hover {background-color:#FF704D;}
a:active {background-color:#FF704D;}
 Set different list item markers for ordered lists
 ol.c {list-style-type: upper-roman;}
ol.d {list-style-type: lower-alpha;}
 Set different list item markers for unordered lists
 ul.a {list-style-type: circle;}
ul.b {list-style-type: square;}
 Set an image as the list item marker
 ul
{
list-style-image: url(‘image.gif');
}
 The look of an HTML table can be greatly
improved with CSS.
 Table Borders
 To specify table borders in CSS, use the
border property.
 table, th, td
{
border: 1px solid black;
}
 Table Width and Height
 Width and height of a table is defined by the width and height
properties.
 The example below sets the width of the table to 100%, and
the height of the th elements to 50px:
 table
{
width:100%;
}
th
{
height:50px;
}
 Table Text Alignment
 The text in a table is aligned with the text-
align and vertical-align properties.
 The text-align property sets the horizontal
alignment, like left, right, or center:
 td
{
text-align:right;
}
 The vertical-align property sets the vertical
alignment, like top, bottom, or middle:
 Example
 td
{
height:50px;
vertical-align:bottom;
}
 Table Padding
 To control the space between the border and
content in a table, use the padding property
on td and th elements:
 Example
 td
{
padding:15px;
}
 Table Color
 The example below specifies the color of the borders,
and the text and background color of th elements:
 Example
 table, td, th
{
border:1px solid green;
}
th
{
background-color:green;
color:white;
}
 All HTML elements can be considered as
boxes. In CSS, the term "box model" is used
when talking about design and layout.
 The CSS box model is essentially a box that
wraps around HTML elements, and it consists
of: margins, borders, padding, and the actual
content.
 The box model allows us to place a border
around elements and space elements in
relation to other elements.
 Margin - Clears an area around the border.
The margin does not have a background
color, it is completely transparent
 Border - A border that goes around the
padding and content. The border is affected
by the background color of the box
 Padding - Clears an area around the content.
The padding is affected by the background
color of the box
 Content - The content of the box, where text
and images appear
 Border Style
 The border-style property specifies what kind
of border to display.
 dotted: Defines a dotted border
 dashed: Defines a dashed border
 solid: Defines a solid border
 double: Defines two borders. The width of the
two borders are the same as the border-
width value
 groove: Defines a 3D grooved border. The
effect depends on the border-color value
 ridge: Defines a 3D ridged border. The effect
depends on the border-color value
 inset: Defines a 3D inset border. The effect
depends on the border-color value
 outset: Defines a 3D outset border. The effect
depends on the border-color value
 Border Width
 The border-width property is used to set the
width of the border.
 The width is set in pixels, or by using one of
the three pre-defined values: thin, medium,
or thick.
 border-width:5px;
 border-width:medium;
 Border Color
 The border-color property is used to set the
color of the border. The color can be set by:
 name - specify a color name, like "red"
 RGB - specify a RGB value, like "rgb(255,0,0)"
 Hex - specify a hex value, like "#ff0000"
 You can also set the border color to
"transparent".
 border-color:red;
 border-color:#98bf21;
 Border - Individual sides
 In CSS it is possible to specify different
borders for different sides:
 Example
 p
{
border-top-style:dotted;
border-right-style:solid;
border-bottom-style:dotted;
border-left-style:solid;
}



 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
 The border property is a shorthand for the
following individual border properties:
 border-width
 border-style (required)
 border-color
 border:5px solid red;
 An outline is a line that is drawn around elements
(outside the borders) to make the element "stand
out".
 The outline properties specify the style, color, and
width of an outline.
 CSS outline Property

Example
 Set the outline around an element:
 p
{
outline:#00FF00 dotted thick;
}
 outline-color: Sets the color of an outline
 Values possible: color_name, hex_number
rgb_number
 outline-style: Sets the style of an outline
 Values possible: none
dotted
dashed
solid…
 outline-width: Sets the width of an outline
 Values Possible: thin, medium, thick
 The margin clears an area around an element
(outside the border). The margin does not
have a background color, and is completely
transparent.
 The top, right, bottom, and left margin can
be changed independently using separate
properties. A shorthand margin property can
also be used, to change all margins at once.
 Values:
 auto: The browser calculates a margin
 length: Specifies a margin in px, pt, cm, etc.
Default value is 0px
 %: Specifies a margin in percent of the width of
the containing element
 Inherit: Specifies that the margin should be
inherited from the parent element
 Margin - Individual sides
 margin-top:100px;
margin-bottom:100px;
margin-right:50px;
margin-left:50px;
 Margin - Shorthand property
 The shorthand property for all the margin
properties is "margin":
 margin:100px 50px;
 The CSS padding properties define the space
between the element border and the element
content.
 The padding clears an area around the content
(inside the border) of an element. The padding is
affected by the background color of the element.
 Values:
 length : Defines a fixed padding (in pixels, pt,
em, etc.)
 %: Defines a padding in % of the containing
element
 Padding - Individual sides
 In CSS, it is possible to specify different padding
for different sides:
 padding-top:25px;

padding-bottom:25px;
padding-right:50px;
padding-left:50px;
 Shorthand property:
 padding:25px 50px;
 Grouping Selectors
 In style sheets there are often elements with
the same style.
 To minimize the code, you can group
selectors.
 Separate each selector with a comma.
 h1,h2,p
{
color:green;
}
 It is possible to apply a style for a selector within
 p
{
color:blue;
text-align:center;
}
.marked
{
background-color:red;
}
.marked p
{
color:white;
} a selector.
 The CSS dimension properties allow you to
control the height and width of an element.
 Properties:
 Height:Sets the height of an elementauto
Values: length,%,inherit
 max-height:Sets the maximum height of an
element
 max-widthSets the maximum width of an
element
 min-height: Sets the minimum height of an
element
 min-width: Sets the minimum width of an
element
 Width: Sets the width of an element
 The display property specifies if/how an
element is displayed, and the visibility
property specifies if an element should be
visible or hidden.

Hiding an Element - display:none or
visibility:hidden
 h1.hidden {visibility:hidden;}
 display:none hides an element, and it will not
take up any space. The element will be
hidden, and the page will be displayed as if
the element is not there:
 h1.hidden {display:none;}
 Fixed Positioning
 An element with fixed position is positioned
relative to the browser window.
 It will not move even if the window is scrolled:
 Example
 p.pos_fixed
{
position:fixed;
top:30px;
right:5px;
}
 Relative Positioning
 A relative positioned element is positioned
relative to its normal position.
 h2.pos_left
{
position:relative;
left:-20px;
}
h2.pos_right
{
position:relative;
left:20px;
}
 Absolute Positioning
 An absolute position element is positioned
relative to the first parent element that has a
position other than static. If no such element is
found, the containing block is <html>:
 Example
 h2
{
position:absolute;
left:100px;
top:150px;
}
 Center Aligning Using the margin Property
 Block elements can be aligned by setting the
left and right margins to "auto".
 .center
{
margin-left:auto;
margin-right:auto;
width:70%;
background-color:#b0e0e6;
}
 Left and Right Aligning Using the position
Property
 One method of aligning elements is to use
absolute positioning:
 Example
 .right
{
position:absolute;
right:0px;
width:300px;
background-color:#b0e0e6;
}
 Crossbrowser Compatibility Issues
 When aligning elements like this, it is always
a good idea to predefine margin and padding
for the <body> element. This is to avoid
visual differences in different browsers.
 Left and Right Aligning Using the float
Property
 One method of aligning elements is to use
the float property:
 float:right;
 CSS pseudo-classes are used to add special
effects to some selectors.
 Syntax
 selector:pseudo-class {property:value;}
 Anchor Pseudo-classes
 a:link {color:#FF0000;} /* unvisited link */
a:visited {color:#00FF00;} /* visited link */
a:hover {color:#FF00FF;} /* mouse over link*/
a:active {color:#0000FF;} /* selected link */
 Pseudo-classes can be combined with CSS
classes:
 a.red:visited {color:#FF0000;}
 Match the first <p> element
 p:first-child
{
color:blue;
}
</style>
</head>
<body>
<p>I am a strong man.</p>
<p>I am a strong man.</p>
 Match the first <i> element in all <p> elements
 In the following example, the selector matches the first
<i> element in all <p> elements:
 <style>
p > i:first-child
{
color:blue;
}
</style>
</head>
<body>
<p>I am a <i>strong</i> man. I am a <i>strong</i>
man.</p>
<p>I am a <i>strong</i> man. I am a <i>strong</i>
man.</p>
 Match all <i> elements in all first child <p> elements
 <style>
p:first-child i
{
color:blue;
}
</style>
</head>
<body>
<p>I am a <i>strong</i> man. I am a
<i>strong</i> man.</p>
<p>I am a <i>strong</i> man. I am a
<i>strong</i> man.</p>
</body>
 CSS pseudo-elements are used to add special
effects to some selectors.
 The :first-line Pseudo-element
 The "first-line" pseudo-element is used to
add a special style to the first line of a text.
 p:first-line
{
color:#ff0000;
font-variant:small-caps;
}
 The :first-letter Pseudo-element
 The "first-letter" pseudo-element is used to
add a special style to the first letter of a text:
 p:first-letter
{
color:#ff0000;
font-size:xx-large;
}
 CSS - The :before Pseudo-element
 The ":before" pseudo-element can be used to
insert some content before the content of an
element.
 h1:before
{
content:url(smiley.gif);
}
 <ul>
<li><a href="default.asp">Home</a></li>
<li><a href="news.asp">News</a></li>
<li><a href="contact.asp">Contact</a></li>
<li><a href="about.asp">About</a></li>
</ul>
 To remove bullets and margins:
 ul
{
list-style-type:none;
margin:0;
padding:0;
}
 Image Sprites
 An image sprite is a collection of images put
into a single image.
 A web page with many images can take a
long time to load and generates multiple
server requests.
 Using image sprites will reduce the number of
server requests and save bandwidth.
 With CSS3, you can create rounded borders,
add shadow to boxes, and use an image as a
border - without using a design program, like
Photoshop.
 3 types:
 border-radius
 box-shadow
 border-image
 CSS3 Rounded Corners:
 In CSS3, the border-radius property is used
to create rounded corners:
 div
{
border:2px solid;
border-radius:25px;
}
 CSS3 Box Shadow
 In CSS3, the box-shadow property is used to
add shadow to boxes:
 box-shadow: h-shadow v-shadow blur
spread color inset;
 box-shadow: 10px 10px 5px #888888;
 CSS3 Border Image:
 With the CSS3 border-image property you can
use an image to create a border
 Syntax
 border-image: source slice width outset
repeat ;
 CSS3 Text Shadow
 In CSS3, the text-shadow property applies
shadow to text.
 Syntax:
 text-shadow: h-shadow v-shadow blur color
;
 CSS3 Word Wrapping:
 If a word is too long to fit within an area, it
expands outside.
 Allow long words to be able to break and
wrap onto the next line.
 Syntax
 word-wrap: normal|break-word;
 With CSS3, web designers can use whatever font he/she
likes.
 <style>
@font-face
{
font-family: myFirstFont;
src: url(sansation_light.woff);
}
div
{
font-family:myFirstFont;
}
</style>

 A transform is an effect that lets an element
change shape, size and position.
 translate()
 rotate()
 scale()
 skew()
 matrix()
 The translate() Method :
 With the translate() method, the element moves
from its current position, depending on the
parameters given for the left (X-axis) and the top
(Y-axis) position.
 transform:translate(50px,100px);
 -ms-transform:translate(50px,100px); /* IE 9 */
 -webkit-transform:translate(50px,100px); /*
Safari and Chrome */
 The rotate() Method
 With the rotate() method, the element rotates
clockwise at a given degree. Negative values
are allowed and rotates the element counter-
clockwise.
 transform: rotate(30deg);
-ms-transform: rotate(30deg); /* IE 9 */
-webkit-transform: rotate(30deg); /* Safari
and Chrome */
 The scale() Method
 With the scale() method, the element
increases or decreases the size, depending on
the parameters given for the width (X-axis)
and the height (Y-axis):

transform: scale(2,4);
-ms-transform: scale(2,4); /* IE 9 */
-webkit-transform: scale(2,4); /* Safari and
Chrome */
 The skew() Method
 With the skew() method, the element turns in
a given angle, depending on the parameters
given for the horizontal (X-axis) and the
vertical (Y-axis) lines:
 transform: skew(30deg,20deg);
-ms-transform: skew(30deg,20deg); /* IE 9
*/
-webkit-transform: skew(30deg,20deg); /*
Safari and Chrome */
 The matrix() Method
 The matrix() method combines all of the 2D
transform methods into one.
 The matrix method take six parameters,
containing mathematic functions, which
allows you to: rotate, scale, move (translate),
and skew elements.
 How to rotate a div element 30 degrees,
using the matrix method:
 div
{
transform:matrix(0.866,0.5,-0.5,0.866,0,0);
-ms-transform:matrix(0.866,0.5,-
0.5,0.866,0,0); /* IE 9 */
-webkit-transform:matrix(0.866,0.5,-
0.5,0.866,0,0); /* Safari and Chrome */
}
 The rotateX() Method
 transform: rotateX(120deg);
-webkit-transform: rotateX(120deg); /* Safari
and Chrome */
 The rotateY() Method
 transform: rotateY(130deg);
-webkit-transform: rotateY(130deg); /* Safari
and Chrome */
 The transition property is a shorthand
property for the four transition properties:
 transition-property, transition-duration,
transition-timing-function, and transition-
delay.
 transition: property duration timing-function
delay;

 transition-propertySpecifies the name of the
CSS property the transition effect is for
 transition-durationSpecifies how many
seconds or milliseconds the transition effect
takes to complete
 transition-timing-functionSpecifies the speed
curve of the transition effect
 transition-delayDefines when the transition
effect will start
 CSS3 @keyframes Rule:
 The @keyframes rule is where the animation
is created. Specify a CSS style inside the
@keyframes rule and the animation will
gradually change from the current style to the
new style.
 @keyframes myfirst
{
from {background: red;}
to {background: yellow;}
}
@-webkit-keyframes myfirst /* Safari and
Chrome */
{
from {background: red;}
to {background: yellow;}
}
 column-count
 column-gap
 column-rule

-moz-column-count:3; /* Firefox */
-webkit-column-count:3; /* Safari and
Chrome */
column-count:3;
column-gap:40px;
 column-rule:3px outset #ff00ff;
 resize
 box-sizing
 outline-offset
 CSS Resize:
 div
{
resize:both;
overflow:auto;
}
 CSS3 Box Sizing
 The box-sizing property allows you to define
certain elements to fit an area in a certain
way:
 div
{
box-sizing:border-box;
-moz-box-sizing:border-box; /* Firefox */
width:50%;
float:left;
}
 CSS3 Outline Offset
 The outline-offset property offsets an outline,
and draws it beyond the border edge.
 Outlines differ from borders in two ways:
 Outlines do not take up space
 Outlines may be non-rectangular
 div
{
border:2px solid black;
outline:2px solid red;
outline-offset:15px;
}
 CSS3 Outline Offset
 The outline-offset property offsets an outline,
and draws it beyond the border edge.
 Outlines differ from borders in two ways:
 Outlines do not take up space
 Outlines may be non-rectangular
 div
{
border:2px solid black;
outline:2px solid red;
outline-offset:15px;
}
Css

Weitere ähnliche Inhalte

Was ist angesagt? (20)

XML Document Object Model (DOM)
XML Document Object Model (DOM)XML Document Object Model (DOM)
XML Document Object Model (DOM)
 
Css3
Css3Css3
Css3
 
Html images syntax
Html images syntaxHtml images syntax
Html images syntax
 
Java script
Java scriptJava script
Java script
 
Dhtml ppt (2)
Dhtml ppt (2)Dhtml ppt (2)
Dhtml ppt (2)
 
Javascript
JavascriptJavascript
Javascript
 
Intro to HTML and CSS basics
Intro to HTML and CSS basicsIntro to HTML and CSS basics
Intro to HTML and CSS basics
 
CSS Positioning and Features of CSS3
CSS Positioning and Features of CSS3CSS Positioning and Features of CSS3
CSS Positioning and Features of CSS3
 
Cascading style sheets (CSS)
Cascading style sheets (CSS)Cascading style sheets (CSS)
Cascading style sheets (CSS)
 
Css ppt
Css pptCss ppt
Css ppt
 
Introduction to JavaScript
Introduction to JavaScriptIntroduction to JavaScript
Introduction to JavaScript
 
Flexbox and Grid Layout
Flexbox and Grid LayoutFlexbox and Grid Layout
Flexbox and Grid Layout
 
cascading style sheet ppt
cascading style sheet pptcascading style sheet ppt
cascading style sheet ppt
 
Learning Html
Learning HtmlLearning Html
Learning Html
 
Advanced Cascading Style Sheets
Advanced Cascading Style SheetsAdvanced Cascading Style Sheets
Advanced Cascading Style Sheets
 
CSS
CSSCSS
CSS
 
Css Ppt
Css PptCss Ppt
Css Ppt
 
Hyperlinks in HTML
Hyperlinks in HTMLHyperlinks in HTML
Hyperlinks in HTML
 
html-table
html-tablehtml-table
html-table
 
Css types internal, external and inline (1)
Css types internal, external and inline (1)Css types internal, external and inline (1)
Css types internal, external and inline (1)
 

Ähnlich wie Css (20)

Web - CSS 1.pptx
Web - CSS 1.pptxWeb - CSS 1.pptx
Web - CSS 1.pptx
 
Web Design Course: CSS lecture 3
Web Design Course: CSS lecture 3Web Design Course: CSS lecture 3
Web Design Course: CSS lecture 3
 
CSS_Day_Two (W3schools)
CSS_Day_Two (W3schools)CSS_Day_Two (W3schools)
CSS_Day_Two (W3schools)
 
CSS
CSSCSS
CSS
 
Css.prabu
Css.prabuCss.prabu
Css.prabu
 
CSS
CSSCSS
CSS
 
Css
CssCss
Css
 
CSS Cascade Style Sheet
CSS Cascade Style SheetCSS Cascade Style Sheet
CSS Cascade Style Sheet
 
Cascading style sheet part 2
Cascading style sheet   part 2Cascading style sheet   part 2
Cascading style sheet part 2
 
Cascading style sheets (CSS-Web Technology)
Cascading style sheets (CSS-Web Technology)Cascading style sheets (CSS-Web Technology)
Cascading style sheets (CSS-Web Technology)
 
Css
CssCss
Css
 
CSS Presentation Notes.pptx
CSS Presentation Notes.pptxCSS Presentation Notes.pptx
CSS Presentation Notes.pptx
 
css-ppt.pdf
css-ppt.pdfcss-ppt.pdf
css-ppt.pdf
 
Web day01 MOL.pdf
Web day01 MOL.pdfWeb day01 MOL.pdf
Web day01 MOL.pdf
 
Introduction to CSS3
Introduction to CSS3Introduction to CSS3
Introduction to CSS3
 
Pemrograman Web 3 - CSS Basic Part 2
Pemrograman Web 3 - CSS Basic Part 2Pemrograman Web 3 - CSS Basic Part 2
Pemrograman Web 3 - CSS Basic Part 2
 
Html 2
Html   2Html   2
Html 2
 
CSS - Basics
CSS - BasicsCSS - Basics
CSS - Basics
 
Css
CssCss
Css
 
5. Web Technology CSS Advanced
5. Web Technology CSS Advanced 5. Web Technology CSS Advanced
5. Web Technology CSS Advanced
 

Mehr von Vijay Raj Yanamala

DIFFUSION BASED AND VASCULAR CONSTRUCTS, TRANSPORT OF NUTRIENTS AND METABOLITES
DIFFUSION BASED AND VASCULAR CONSTRUCTS, TRANSPORT OF NUTRIENTS AND METABOLITES DIFFUSION BASED AND VASCULAR CONSTRUCTS, TRANSPORT OF NUTRIENTS AND METABOLITES
DIFFUSION BASED AND VASCULAR CONSTRUCTS, TRANSPORT OF NUTRIENTS AND METABOLITES Vijay Raj Yanamala
 
DIFFUSION BASED AND VASCULAR CONSTRUCTS, TRANSPORT OF NUTRIENTS AND METABOLITES
DIFFUSION BASED AND VASCULAR CONSTRUCTS, TRANSPORT OF NUTRIENTS AND METABOLITES DIFFUSION BASED AND VASCULAR CONSTRUCTS, TRANSPORT OF NUTRIENTS AND METABOLITES
DIFFUSION BASED AND VASCULAR CONSTRUCTS, TRANSPORT OF NUTRIENTS AND METABOLITES Vijay Raj Yanamala
 
Information Technology in Hospitals
Information Technology in HospitalsInformation Technology in Hospitals
Information Technology in HospitalsVijay Raj Yanamala
 
C-elegans locomotion tracking system
C-elegans locomotion tracking systemC-elegans locomotion tracking system
C-elegans locomotion tracking systemVijay Raj Yanamala
 
Impedence in EEG ( electroencephalography )
Impedence in EEG  ( electroencephalography ) Impedence in EEG  ( electroencephalography )
Impedence in EEG ( electroencephalography ) Vijay Raj Yanamala
 
Integrated clinical information systems
Integrated clinical information systemsIntegrated clinical information systems
Integrated clinical information systemsVijay Raj Yanamala
 
Healthcare reform using information technology
Healthcare reform using information technologyHealthcare reform using information technology
Healthcare reform using information technologyVijay Raj Yanamala
 

Mehr von Vijay Raj Yanamala (20)

NABH Extended
NABH Extended NABH Extended
NABH Extended
 
Scale up in Tissue Eng
Scale up in Tissue EngScale up in Tissue Eng
Scale up in Tissue Eng
 
DIFFUSION BASED AND VASCULAR CONSTRUCTS, TRANSPORT OF NUTRIENTS AND METABOLITES
DIFFUSION BASED AND VASCULAR CONSTRUCTS, TRANSPORT OF NUTRIENTS AND METABOLITES DIFFUSION BASED AND VASCULAR CONSTRUCTS, TRANSPORT OF NUTRIENTS AND METABOLITES
DIFFUSION BASED AND VASCULAR CONSTRUCTS, TRANSPORT OF NUTRIENTS AND METABOLITES
 
DIFFUSION BASED AND VASCULAR CONSTRUCTS, TRANSPORT OF NUTRIENTS AND METABOLITES
DIFFUSION BASED AND VASCULAR CONSTRUCTS, TRANSPORT OF NUTRIENTS AND METABOLITES DIFFUSION BASED AND VASCULAR CONSTRUCTS, TRANSPORT OF NUTRIENTS AND METABOLITES
DIFFUSION BASED AND VASCULAR CONSTRUCTS, TRANSPORT OF NUTRIENTS AND METABOLITES
 
MHRA
MHRAMHRA
MHRA
 
NABH
NABHNABH
NABH
 
Information Technology in Hospitals
Information Technology in HospitalsInformation Technology in Hospitals
Information Technology in Hospitals
 
C-elegans locomotion tracking system
C-elegans locomotion tracking systemC-elegans locomotion tracking system
C-elegans locomotion tracking system
 
Electrosurgery
ElectrosurgeryElectrosurgery
Electrosurgery
 
Mission and vision
Mission and vision Mission and vision
Mission and vision
 
Sleep action centres
Sleep action centres Sleep action centres
Sleep action centres
 
Leucodepletion filters
Leucodepletion filtersLeucodepletion filters
Leucodepletion filters
 
catheters
catheters catheters
catheters
 
Epilepsy
EpilepsyEpilepsy
Epilepsy
 
Impedence in EEG ( electroencephalography )
Impedence in EEG  ( electroencephalography ) Impedence in EEG  ( electroencephalography )
Impedence in EEG ( electroencephalography )
 
Clinical Attachment
Clinical AttachmentClinical Attachment
Clinical Attachment
 
DCD of pulse oximeter
DCD of pulse oximeter DCD of pulse oximeter
DCD of pulse oximeter
 
Pregnant lady gait analysis
Pregnant lady gait analysisPregnant lady gait analysis
Pregnant lady gait analysis
 
Integrated clinical information systems
Integrated clinical information systemsIntegrated clinical information systems
Integrated clinical information systems
 
Healthcare reform using information technology
Healthcare reform using information technologyHealthcare reform using information technology
Healthcare reform using information technology
 

Kürzlich hochgeladen

ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfVanessa Camilleri
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptxMusic 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptxleah joy valeriano
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxAshokKarra1
 
Food processing presentation for bsc agriculture hons
Food processing presentation for bsc agriculture honsFood processing presentation for bsc agriculture hons
Food processing presentation for bsc agriculture honsManeerUddin
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSJoshuaGantuangco2
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfTechSoup
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...Postal Advocate Inc.
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxCarlos105
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxlancelewisportillo
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptxiammrhaywood
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfPatidar M
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 

Kürzlich hochgeladen (20)

ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdf
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptxMusic 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptx
 
Food processing presentation for bsc agriculture hons
Food processing presentation for bsc agriculture honsFood processing presentation for bsc agriculture hons
Food processing presentation for bsc agriculture hons
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptxLEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
 
Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptxRaw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
 
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptxYOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdf
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 

Css

  • 1.
  • 2.  Styles define how to display HTML elements  Styles were added to HTML 4.0 to solve a problem  External Style Sheets can save a lot of work  External Style Sheets are stored in CSS files
  • 3.
  • 4.  The id selector is used to specify a style for a single, unique element.  The id selector uses the id attribute of the HTML element, and is defined with a "#".  The class selector is used to specify a style for a group of elements. Unlike the id selector, the class selector is most often used on several elements.  The class selector uses the HTML class attribute, and is defined with a "."
  • 5.  CSS background properties are used to define the background effects of an element.  CSS properties used for background effects:  background-color  background-image  background-repeat  background-attachment  background-position
  • 6.  Background Color  body {background-color:#b0c4de;}  Background Image:  body {background-image:url('paper.gif');}
  • 7.  Text Color  The color property is used to set the color of the text.  body {color:blue;} h1 {color:#00ff00;} h2 {color:rgb(255,0,0);}
  • 8.  direction :Specifies the text direction/writing direction  letter-spacing: Increases or decreases the space between characters in a text  line-height: Sets the line height  text-align: Specifies the horizontal alignment of text  text-decoration: Specifies the decoration added to text  text-indent: Specifies the indentation of the first line in a text-block
  • 9.  text-shadow: Specifies the shadow effect added to text  text-transform: Controls the capitalization of text  vertical-align: Sets the vertical alignment of an element  white-space: Specifies how white-space inside an element is handled  word-spacing: Increases or decreases the space between words in a text
  • 10.  CSS font properties define the font family, boldness, size, and the style of a text.  In CSS, there are two types of font family names:  generic family - a group of font families with a similar look (like "Serif" or "Monospace")  font family - a specific font family (like "Times New Roman" or "Arial")  p{font-family:"Times New Roman", Times, serif;}
  • 11.  Font Style The font-style property is mostly used to specify italic text.  This property has three values:  normal - The text is shown normally  italic - The text is shown in italics  oblique - The text is "leaning" (oblique is very similar to italic, but less supported)  p.normal {font-style:normal;}
  • 12.  Font Size  The font-size property sets the size of the text.  Set Font Size With Pixels  Setting the text size with pixels gives you full control over the text size:  h1 {font-size:40px;}  Set Font Size With Em  h1 {font-size:2.5em;} /* 40px/16=2.5em */
  • 13.  Styling Links  Links can be styled with any CSS property (e.g. color, font-family, background, etc.).  In addition, links can be styled differently depending on what state they are in.  The four links states are:  a:link - a normal, unvisited link  a:visited - a link the user has visited  a:hover - a link when the user mouses over it  a:active - a link the moment it is clicked  a:link {color:blue;}
  • 14.  Text Decoration  The text-decoration property is mostly used to remove underlines from links:  Example  a:link {text-decoration:none;} a:visited {text-decoration:none;} a:hover {text-decoration:underline;} a:active {text-decoration:underline;}
  • 15.  Background Color:  The background-color property specifies the background color for links:  Example  a:link {background-color:#B2FF99;} a:visited {background-color:#FFFF85;} a:hover {background-color:#FF704D;} a:active {background-color:#FF704D;}
  • 16.  Set different list item markers for ordered lists  ol.c {list-style-type: upper-roman;} ol.d {list-style-type: lower-alpha;}  Set different list item markers for unordered lists  ul.a {list-style-type: circle;} ul.b {list-style-type: square;}  Set an image as the list item marker  ul { list-style-image: url(‘image.gif'); }
  • 17.  The look of an HTML table can be greatly improved with CSS.  Table Borders  To specify table borders in CSS, use the border property.  table, th, td { border: 1px solid black; }
  • 18.  Table Width and Height  Width and height of a table is defined by the width and height properties.  The example below sets the width of the table to 100%, and the height of the th elements to 50px:  table { width:100%; } th { height:50px; }
  • 19.  Table Text Alignment  The text in a table is aligned with the text- align and vertical-align properties.  The text-align property sets the horizontal alignment, like left, right, or center:  td { text-align:right; }
  • 20.  The vertical-align property sets the vertical alignment, like top, bottom, or middle:  Example  td { height:50px; vertical-align:bottom; }
  • 21.  Table Padding  To control the space between the border and content in a table, use the padding property on td and th elements:  Example  td { padding:15px; }
  • 22.  Table Color  The example below specifies the color of the borders, and the text and background color of th elements:  Example  table, td, th { border:1px solid green; } th { background-color:green; color:white; }
  • 23.  All HTML elements can be considered as boxes. In CSS, the term "box model" is used when talking about design and layout.  The CSS box model is essentially a box that wraps around HTML elements, and it consists of: margins, borders, padding, and the actual content.  The box model allows us to place a border around elements and space elements in relation to other elements.
  • 24.
  • 25.  Margin - Clears an area around the border. The margin does not have a background color, it is completely transparent  Border - A border that goes around the padding and content. The border is affected by the background color of the box  Padding - Clears an area around the content. The padding is affected by the background color of the box  Content - The content of the box, where text and images appear
  • 26.  Border Style  The border-style property specifies what kind of border to display.  dotted: Defines a dotted border  dashed: Defines a dashed border  solid: Defines a solid border  double: Defines two borders. The width of the two borders are the same as the border- width value
  • 27.  groove: Defines a 3D grooved border. The effect depends on the border-color value  ridge: Defines a 3D ridged border. The effect depends on the border-color value  inset: Defines a 3D inset border. The effect depends on the border-color value  outset: Defines a 3D outset border. The effect depends on the border-color value
  • 28.
  • 29.  Border Width  The border-width property is used to set the width of the border.  The width is set in pixels, or by using one of the three pre-defined values: thin, medium, or thick.  border-width:5px;  border-width:medium;
  • 30.  Border Color  The border-color property is used to set the color of the border. The color can be set by:  name - specify a color name, like "red"  RGB - specify a RGB value, like "rgb(255,0,0)"  Hex - specify a hex value, like "#ff0000"  You can also set the border color to "transparent".  border-color:red;  border-color:#98bf21;
  • 31.  Border - Individual sides  In CSS it is possible to specify different borders for different sides:  Example  p { border-top-style:dotted; border-right-style:solid; border-bottom-style:dotted; border-left-style:solid; }   
  • 32.  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
  • 33.  border-style:dotted solid; ◦ top and bottom borders are dotted ◦ right and left borders are solid  border-style:dotted; ◦ all four borders are dotted  The border property is a shorthand for the following individual border properties:  border-width  border-style (required)  border-color  border:5px solid red;
  • 34.  An outline is a line that is drawn around elements (outside the borders) to make the element "stand out".  The outline properties specify the style, color, and width of an outline.  CSS outline Property  Example  Set the outline around an element:  p { outline:#00FF00 dotted thick; }
  • 35.  outline-color: Sets the color of an outline  Values possible: color_name, hex_number rgb_number  outline-style: Sets the style of an outline  Values possible: none dotted dashed solid…  outline-width: Sets the width of an outline  Values Possible: thin, medium, thick
  • 36.  The margin clears an area around an element (outside the border). The margin does not have a background color, and is completely transparent.  The top, right, bottom, and left margin can be changed independently using separate properties. A shorthand margin property can also be used, to change all margins at once.
  • 37.  Values:  auto: The browser calculates a margin  length: Specifies a margin in px, pt, cm, etc. Default value is 0px  %: Specifies a margin in percent of the width of the containing element  Inherit: Specifies that the margin should be inherited from the parent element
  • 38.  Margin - Individual sides  margin-top:100px; margin-bottom:100px; margin-right:50px; margin-left:50px;  Margin - Shorthand property  The shorthand property for all the margin properties is "margin":  margin:100px 50px;
  • 39.  The CSS padding properties define the space between the element border and the element content.  The padding clears an area around the content (inside the border) of an element. The padding is affected by the background color of the element.  Values:  length : Defines a fixed padding (in pixels, pt, em, etc.)  %: Defines a padding in % of the containing element
  • 40.  Padding - Individual sides  In CSS, it is possible to specify different padding for different sides:  padding-top:25px;  padding-bottom:25px; padding-right:50px; padding-left:50px;  Shorthand property:  padding:25px 50px;
  • 41.  Grouping Selectors  In style sheets there are often elements with the same style.  To minimize the code, you can group selectors.  Separate each selector with a comma.  h1,h2,p { color:green; }
  • 42.  It is possible to apply a style for a selector within  p { color:blue; text-align:center; } .marked { background-color:red; } .marked p { color:white; } a selector.
  • 43.  The CSS dimension properties allow you to control the height and width of an element.  Properties:  Height:Sets the height of an elementauto Values: length,%,inherit  max-height:Sets the maximum height of an element  max-widthSets the maximum width of an element
  • 44.  min-height: Sets the minimum height of an element  min-width: Sets the minimum width of an element  Width: Sets the width of an element
  • 45.  The display property specifies if/how an element is displayed, and the visibility property specifies if an element should be visible or hidden.  Hiding an Element - display:none or visibility:hidden  h1.hidden {visibility:hidden;}
  • 46.  display:none hides an element, and it will not take up any space. The element will be hidden, and the page will be displayed as if the element is not there:  h1.hidden {display:none;}
  • 47.  Fixed Positioning  An element with fixed position is positioned relative to the browser window.  It will not move even if the window is scrolled:  Example  p.pos_fixed { position:fixed; top:30px; right:5px; }
  • 48.  Relative Positioning  A relative positioned element is positioned relative to its normal position.  h2.pos_left { position:relative; left:-20px; } h2.pos_right { position:relative; left:20px; }
  • 49.  Absolute Positioning  An absolute position element is positioned relative to the first parent element that has a position other than static. If no such element is found, the containing block is <html>:  Example  h2 { position:absolute; left:100px; top:150px; }
  • 50.  Center Aligning Using the margin Property  Block elements can be aligned by setting the left and right margins to "auto".  .center { margin-left:auto; margin-right:auto; width:70%; background-color:#b0e0e6; }
  • 51.  Left and Right Aligning Using the position Property  One method of aligning elements is to use absolute positioning:  Example  .right { position:absolute; right:0px; width:300px; background-color:#b0e0e6; }
  • 52.  Crossbrowser Compatibility Issues  When aligning elements like this, it is always a good idea to predefine margin and padding for the <body> element. This is to avoid visual differences in different browsers.  Left and Right Aligning Using the float Property  One method of aligning elements is to use the float property:  float:right;
  • 53.  CSS pseudo-classes are used to add special effects to some selectors.  Syntax  selector:pseudo-class {property:value;}  Anchor Pseudo-classes  a:link {color:#FF0000;} /* unvisited link */ a:visited {color:#00FF00;} /* visited link */ a:hover {color:#FF00FF;} /* mouse over link*/ a:active {color:#0000FF;} /* selected link */
  • 54.  Pseudo-classes can be combined with CSS classes:  a.red:visited {color:#FF0000;}  Match the first <p> element  p:first-child { color:blue; } </style> </head> <body> <p>I am a strong man.</p> <p>I am a strong man.</p>
  • 55.  Match the first <i> element in all <p> elements  In the following example, the selector matches the first <i> element in all <p> elements:  <style> p > i:first-child { color:blue; } </style> </head> <body> <p>I am a <i>strong</i> man. I am a <i>strong</i> man.</p> <p>I am a <i>strong</i> man. I am a <i>strong</i> man.</p>
  • 56.  Match all <i> elements in all first child <p> elements  <style> p:first-child i { color:blue; } </style> </head> <body> <p>I am a <i>strong</i> man. I am a <i>strong</i> man.</p> <p>I am a <i>strong</i> man. I am a <i>strong</i> man.</p> </body>
  • 57.  CSS pseudo-elements are used to add special effects to some selectors.  The :first-line Pseudo-element  The "first-line" pseudo-element is used to add a special style to the first line of a text.  p:first-line { color:#ff0000; font-variant:small-caps; }
  • 58.  The :first-letter Pseudo-element  The "first-letter" pseudo-element is used to add a special style to the first letter of a text:  p:first-letter { color:#ff0000; font-size:xx-large; }
  • 59.  CSS - The :before Pseudo-element  The ":before" pseudo-element can be used to insert some content before the content of an element.  h1:before { content:url(smiley.gif); }
  • 60.
  • 61.  <ul> <li><a href="default.asp">Home</a></li> <li><a href="news.asp">News</a></li> <li><a href="contact.asp">Contact</a></li> <li><a href="about.asp">About</a></li> </ul>  To remove bullets and margins:  ul { list-style-type:none; margin:0; padding:0; }
  • 62.
  • 63.
  • 64.  Image Sprites  An image sprite is a collection of images put into a single image.  A web page with many images can take a long time to load and generates multiple server requests.  Using image sprites will reduce the number of server requests and save bandwidth.
  • 65.
  • 66.  With CSS3, you can create rounded borders, add shadow to boxes, and use an image as a border - without using a design program, like Photoshop.  3 types:  border-radius  box-shadow  border-image
  • 67.  CSS3 Rounded Corners:  In CSS3, the border-radius property is used to create rounded corners:  div { border:2px solid; border-radius:25px; }
  • 68.  CSS3 Box Shadow  In CSS3, the box-shadow property is used to add shadow to boxes:  box-shadow: h-shadow v-shadow blur spread color inset;  box-shadow: 10px 10px 5px #888888;
  • 69.  CSS3 Border Image:  With the CSS3 border-image property you can use an image to create a border  Syntax  border-image: source slice width outset repeat ;
  • 70.  CSS3 Text Shadow  In CSS3, the text-shadow property applies shadow to text.  Syntax:  text-shadow: h-shadow v-shadow blur color ;
  • 71.  CSS3 Word Wrapping:  If a word is too long to fit within an area, it expands outside.  Allow long words to be able to break and wrap onto the next line.  Syntax  word-wrap: normal|break-word;
  • 72.  With CSS3, web designers can use whatever font he/she likes.  <style> @font-face { font-family: myFirstFont; src: url(sansation_light.woff); } div { font-family:myFirstFont; } </style> 
  • 73.  A transform is an effect that lets an element change shape, size and position.  translate()  rotate()  scale()  skew()  matrix()
  • 74.  The translate() Method :  With the translate() method, the element moves from its current position, depending on the parameters given for the left (X-axis) and the top (Y-axis) position.  transform:translate(50px,100px);  -ms-transform:translate(50px,100px); /* IE 9 */  -webkit-transform:translate(50px,100px); /* Safari and Chrome */
  • 75.  The rotate() Method  With the rotate() method, the element rotates clockwise at a given degree. Negative values are allowed and rotates the element counter- clockwise.  transform: rotate(30deg); -ms-transform: rotate(30deg); /* IE 9 */ -webkit-transform: rotate(30deg); /* Safari and Chrome */
  • 76.  The scale() Method  With the scale() method, the element increases or decreases the size, depending on the parameters given for the width (X-axis) and the height (Y-axis):  transform: scale(2,4); -ms-transform: scale(2,4); /* IE 9 */ -webkit-transform: scale(2,4); /* Safari and Chrome */
  • 77.  The skew() Method  With the skew() method, the element turns in a given angle, depending on the parameters given for the horizontal (X-axis) and the vertical (Y-axis) lines:  transform: skew(30deg,20deg); -ms-transform: skew(30deg,20deg); /* IE 9 */ -webkit-transform: skew(30deg,20deg); /* Safari and Chrome */
  • 78.  The matrix() Method  The matrix() method combines all of the 2D transform methods into one.  The matrix method take six parameters, containing mathematic functions, which allows you to: rotate, scale, move (translate), and skew elements.
  • 79.  How to rotate a div element 30 degrees, using the matrix method:  div { transform:matrix(0.866,0.5,-0.5,0.866,0,0); -ms-transform:matrix(0.866,0.5,- 0.5,0.866,0,0); /* IE 9 */ -webkit-transform:matrix(0.866,0.5,- 0.5,0.866,0,0); /* Safari and Chrome */ }
  • 80.  The rotateX() Method  transform: rotateX(120deg); -webkit-transform: rotateX(120deg); /* Safari and Chrome */  The rotateY() Method  transform: rotateY(130deg); -webkit-transform: rotateY(130deg); /* Safari and Chrome */
  • 81.  The transition property is a shorthand property for the four transition properties:  transition-property, transition-duration, transition-timing-function, and transition- delay.  transition: property duration timing-function delay; 
  • 82.  transition-propertySpecifies the name of the CSS property the transition effect is for  transition-durationSpecifies how many seconds or milliseconds the transition effect takes to complete  transition-timing-functionSpecifies the speed curve of the transition effect  transition-delayDefines when the transition effect will start
  • 83.  CSS3 @keyframes Rule:  The @keyframes rule is where the animation is created. Specify a CSS style inside the @keyframes rule and the animation will gradually change from the current style to the new style.
  • 84.  @keyframes myfirst { from {background: red;} to {background: yellow;} } @-webkit-keyframes myfirst /* Safari and Chrome */ { from {background: red;} to {background: yellow;} }
  • 85.  column-count  column-gap  column-rule  -moz-column-count:3; /* Firefox */ -webkit-column-count:3; /* Safari and Chrome */ column-count:3; column-gap:40px;  column-rule:3px outset #ff00ff;
  • 86.  resize  box-sizing  outline-offset  CSS Resize:  div { resize:both; overflow:auto; }
  • 87.  CSS3 Box Sizing  The box-sizing property allows you to define certain elements to fit an area in a certain way:  div { box-sizing:border-box; -moz-box-sizing:border-box; /* Firefox */ width:50%; float:left; }
  • 88.  CSS3 Outline Offset  The outline-offset property offsets an outline, and draws it beyond the border edge.  Outlines differ from borders in two ways:  Outlines do not take up space  Outlines may be non-rectangular  div { border:2px solid black; outline:2px solid red; outline-offset:15px; }
  • 89.  CSS3 Outline Offset  The outline-offset property offsets an outline, and draws it beyond the border edge.  Outlines differ from borders in two ways:  Outlines do not take up space  Outlines may be non-rectangular  div { border:2px solid black; outline:2px solid red; outline-offset:15px; }