SlideShare a Scribd company logo
1 of 88
Introduction to Cascading
Style Sheets (CSS)
Svetlin Nakov
Telerik Corporation
www.telerik.com
Table of Contents
ī‚Ž What is CSS?
ī‚Ž Styling with Cascading Stylesheets (CSS)
ī‚Ž Selectors and style definitions
ī‚Ž Linking HTML and CSS
ī‚Ž Fonts, Backgrounds, Borders
ī‚Ž The Box Model in W3C and IE
ī‚Ž Alignment, Z-Index, Margin, Padding
ī‚Ž Positioning and Floating Elements
ī‚Ž Visibility, Display, Overflow
2
CSS: A New Philosophy
ī‚Ž Separate content from presentation!
3
Title
Lorem ipsum dolor sit amet,
consectetuer adipiscing elit.
Suspendisse at pede ut purus
malesuada dictum. Donec vitae
neque non magna aliquam
dictum.
â€ĸ Vestibulum et odio et ipsum
â€ĸ accumsan accumsan. Morbi at
â€ĸ arcu vel elit ultricies porta. Proin
tortor purus, luctus non, aliquam
nec, interdum vel, mi. Sed nec
quam nec odio lacinia molestie.
Praesent augue tortor, convallis
eget, euismod nonummy, lacinia
ut, risus.
Bold
Italics
Indent
Content
(HTML document)
Presentation
(CSS Document)
The Resulting Page
4
Title
Lorem ipsum dolor sit amet,
consectetuer adipiscing elit.
Suspendisse at pede ut purus
malesuada dictum. Donec vitae neque
non magna aliquam dictum.
â€ĸ Vestibulum et odio et ipsum
â€ĸ accumsan accumsan. Morbi at
â€ĸ arcu vel elit ultricies porta. Proin
Tortor purus, luctus non, aliquam nec,
interdum vel, mi. Sed nec quam nec
odio lacinia molestie. Praesent augue
tortor, convallis eget, euismod
nonummy, lacinia ut, risus.
CSS Intro
Styling with Cascading Stylesheets
CSS Introduction
ī‚Ž Cascading Style Sheets (CSS)
ī‚­ Used to describe the presentation of documents
ī‚­ Define sizes, spacing, fonts, colors, layout, etc.
ī‚­ Improve content accessibility
ī‚­ Improve flexibility
ī‚Ž Designed to separate presentation from content
ī‚Ž Due to CSS, all HTML presentation tags and
attributes are deprecated, e.g. font, center, etc.
6
CSS Introduction (2)
ī‚Ž CSS can be applied to any XML document
ī‚­ Not just to HTML / XHTML
ī‚Ž CSS can specify different styles for different
media
ī‚­ On-screen
ī‚­ In print
ī‚­ Handheld, projection, etc.
ī‚­ â€Ļ even by voice or Braille-based reader
7
Why “Cascading”?
ī‚Ž Priority scheme determining which style rules
apply to element
ī‚­ Cascade priorities or specificity (weight) are
calculated and assigned to the rules
ī‚­ Child elements in the HTML DOM tree inherit
styles from their parent
ī‚­ Can override them
ī‚­ Control via !important rule
8
Why “Cascading”? (2)
9
Why “Cascading”? (3)
ī‚Ž Some CSS styles are inherited and some not
ī‚­ Text-related and list-related properties are
inherited - color, font-size, font-family,
line-height, text-align, list-style, etc
ī‚­ Box-related and positioning styles are not
inherited - width, height, border, margin,
padding, position, float, etc
ī‚­ <a> elements do not inherit color and text-
decoration
10
Style Sheets Syntax
ī‚Ž Stylesheets consist of rules, selectors,
declarations, properties and values
ī‚Ž Selectors are separated by commas
ī‚Ž Declarations are separated by semicolons
ī‚Ž Properties and values are separated by colons
11
h1,h2,h3 { color: green; font-weight: bold; }
http://css.maxdesign.com.au/
Selectors
ī‚Ž Selectors determine which element the rule
applies to:
ī‚­ All elements of specific type (tag)
ī‚­ Those that mach a specific attribute (id, class)
ī‚­ Elements may be matched depending on how
they are nested in the document tree (HTML)
ī‚Ž Examples:
12
.header a { color: green }
#menu>li { padding-top: 8px }
Selectors (2)
ī‚Ž Three primary kinds of selectors:
ī‚­ By tag (type selector):
ī‚­ By element id:
ī‚­ By element class name (only for HTML):
ī‚Ž Selectors can be combined with commas:
This will match <h1> tags, elements with class
link, and element with id top-link
13
h1 { font-family: verdana,sans-serif; }
#element_id { color: #ff0000; }
.myClass {border: 1px solid red}
h1, .link, #top-link {font-weight: bold}
Selectors (3)
ī‚Ž Pseudo-classes define state
ī‚­ :hover, :visited, :active , :lang
ī‚Ž Pseudo-elements define element "parts" or are
used to generate content
ī‚­ :first-line , :before, :after
14
a:hover { color: red; }
p:first-line { text-transform: uppercase; }
.title:before { content: "Âģ"; }
.title:after { content: "ÂĢ"; }
Selectors (4)
ī‚Ž Match relative to element placement:
This will match all <a> tags that are inside of <p>
ī‚Ž * – universal selector (avoid or use with care!):
This will match all descendants of <p> element
ī‚Ž + selector – used to match “next sibling”:
This will match all siblings with class name link
that appear immediately after <img> tag 15
p a {text-decoration: underline}
p * {color: black}
img + .link {float:right}
Selectors (5)
ī‚Ž > selector – matches direct child nodes:
This will match all elements with class error, direct
children of <p> tag
ī‚Ž [ ] – matches tag attributes by regular expression:
This will match all <img> tags with alt attribute
containing the word logo
ī‚Ž .class1.class2 (no space) - matches elements
with both (all) classes applied at the same time
16
p > .error {font-size: 8px}
img[alt~=logo] {border: none}
Values in the CSS Rules
ī‚Ž Colors are set in RGB format (decimal or hex):
ī‚­ Example: #a0a6aa = rgb(160, 166, 170)
ī‚­ Predefined color aliases exist: black, blue, etc.
ī‚Ž Numeric values are specified in:
ī‚­ Pixels, ems, e.g. 12px , 1.4em
ī‚­ Points, inches, centimeters, millimeters
ī‚­ E.g. 10pt , 1in, 1cm, 1mm
ī‚­ Percentages, e.g. 50%
ī‚­ Percentage of what?...
ī‚­ Zero can be used with no unit: border: 0;
17
Default Browser Styles
ī‚Ž Browsers have default CSS styles
ī‚­ Used when there is no CSS information or any
other style information in the document
ī‚Ž Caution: default styles differ in browsers
ī‚­ E.g. margins, paddings and font sizes differ
most often and usually developers reset them
18
* { margin: 0; padding: 0; }
body, h1, p, ul, li { margin: 0; padding: 0; }
Linking HTML and CSS
ī‚Ž HTML (content) and CSS (presentation) can be
linked in three ways:
ī‚­ Inline: the CSS rules in the style attribute
ī‚­ No selectors are needed
ī‚­ Embedded: in the <head> in a <style> tag
ī‚­ External: CSS rules in separate file (best)
ī‚­ Usually a file with .css extension
ī‚­ Linked via <link rel="stylesheet" href=â€Ļ> tag
or @import directive in embedded CSS block
19
Linking HTML and CSS (2)
ī‚Ž Using external files is highly recommended
ī‚­ Simplifies the HTML document
ī‚­ Improves page load speed as the CSS file is
cached
20
Inline Styles: Example
21
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN" "http://www.w3.org/TR/xhtml1/
DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Inline Styles</title>
</head>
<body>
<p>Here is some text</p>
<!--Separate multiple styles with a semicolon-->
<p style="font-size: 20pt">Here is some
more text</p>
<p style="font-size: 20pt;color:
#0000FF" >Even more text</p>
</body>
</html>
inline-styles.html
Inline Styles: Example
22
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN" "http://www.w3.org/TR/xhtml1/
DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Inline Styles</title>
</head>
<body>
<p>Here is some text</p>
<!--Separate multiple styles with a semicolon-->
<p style="font-size: 20pt">Here is some
more text</p>
<p style="font-size: 20pt;color:
#0000FF" >Even more text</p>
</body>
</html>
inline-styles.html
CSS Cascade (Precedence)
ī‚Ž There are browser, user and author stylesheets
with "normal" and "important" declarations
ī‚­ Browser styles (least priority)
ī‚­ Normal user styles
ī‚­ Normal author styles (external, in head, inline)
ī‚­ Important author styles
ī‚­ Important user styles (max priority)
23
a { color: red !important ; }
http://www.slideshare.net/maxdesign/css-cascade-1658158
CSS Specificity
ī‚Ž CSS specificity is used to determine the
precedence of CSS style declarations with the
same origin. Selectors are what matters
ī‚­ Simple calculation: #id = 100, .class = 10,
:pseudo = 10, [attr] = 10, tag = 1, * = 0
ī‚­ Same number of points? Order matters.
ī‚­ See also:
ī‚­ http://www.smashingmagazine.com/2007/07/27/css-specificity-things-
you-should-know/
ī‚­ http://css.maxdesign.com.au/selectutorial/advanced_conflict.htm
24
CSS Rules Precedence
Live Demo
precedence.html
Embedded Styles
ī‚Ž Embedded in the HTML in the <style> tag:
ī‚­ The <style> tag is placed in the <head>
section of the document
ī‚­ type attribute specifies the MIME type
ī‚­ MIME describes the format of the content
ī‚­ Other MIME types include text/html,
image/gif, text/javascript â€Ļ
ī‚Ž Used for document-specific styles
26
<style type="text/css">
Embedded Styles: Example
27
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-
transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Style Sheets</title>
<style type="text/css">
em {background-color:#8000FF; color:white}
h1 {font-family:Arial, sans-serif}
p {font-size:18pt}
.blue {color:blue}
</style>
<head>
embedded-stylesheets.html
Embedded Styles: Example (2)
28
â€Ļ
<body>
<h1 class="blue">A Heading</h1>
<p>Here is some text. Here is some text. Here
is some text. Here is some text. Here is some
text.</p>
<h1>Another Heading</h1>
<p class="blue">Here is some more text.
Here is some more text.</p>
<p class="blue">Here is some <em>more</em>
text. Here is some more text.</p>
</body>
</html>
â€Ļ
<body>
<h1 class="blue">A Heading</h1>
<p>Here is some text. Here is some text. Here
is some text. Here is some text. Here is some
text.</p>
<h1>Another Heading</h1>
<p class="blue">Here is some more text.
Here is some more text.</p>
<p class="blue">Here is some <em>more</em>
text. Here is some more text.</p>
</body>
</html>
Embedded Styles: Example (3)
29
External CSS Styles
ī‚Ž External linking
ī‚­ Separate pages can all use a shared style sheet
ī‚­ Only modify a single file to change the styles across
your entire Web site (see http://www.csszengarden.com/)
ī‚Ž link tag (with a rel attribute)
ī‚­ Specifies a relationship between current document
and another document
ī‚­ link elements should be in the <head>
30
<link rel="stylesheet" type="text/css"
href="styles.css">
External CSS Styles (2)
@import
ī‚­ Another way to link external CSS files
ī‚­ Example:
ī‚­ Ancient browsers do not recognize @import
ī‚­ Use @import in an external CSS file to
workaround the IE 32 CSS file limit
31
<style type="text/css">
@import url("styles.css");
/* same as */
@import "styles.css";
</style>
External Styles: Example
32
/* CSS Document */
a { text-decoration: none }
a:hover { text-decoration: underline;
color: red;
background-color: #CCFFCC }
li em { color: red;
font-weight: bold }
ul { margin-left: 2cm }
ul ul { text-decoration: underline;
margin-left: .5cm }
styles.css
External Styles: Example (2)
33
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-
transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Importing style sheets</title>
<link type="text/css" rel="stylesheet"
href="styles.css" />
</head>
<body>
<h1>Shopping list for <em>Monday</em>:</h1>
<li>Milk</li>
â€Ļ
external-styles.html
External Styles: Example (3)
34
â€Ļ
<li>Bread
<ul>
<li>White bread</li>
<li>Rye bread</li>
<li>Whole wheat bread</li>
</ul>
</li>
<li>Rice</li>
<li>Potatoes</li>
<li>Pizza <em>with mushrooms</em></li>
</ul>
<a href="http://food.com" title="grocery
store">Go to the Grocery store</a>
</body>
</html>
â€Ļ
<li>Bread
<ul>
<li>White bread</li>
<li>Rye bread</li>
<li>Whole wheat bread</li>
</ul>
</li>
<li>Rice</li>
<li>Potatoes</li>
<li>Pizza <em>with mushrooms</em></li>
</ul>
<a href="http://food.com" title="grocery
store">Go to the Grocery store</a>
</body>
</html>
External Styles: Example (4)
35
Text-related CSS Properties
ī‚Ž color – specifies the color of the text
ī‚Ž font-size – size of font: xx-small, x-small,
small, medium, large, x-large, xx-large,
smaller, larger or numeric value
ī‚Ž font-family – comma separated font names
ī‚­ Example: verdana, sans-serif, etc.
ī‚­ The browser loads the first one that is available
ī‚­ There should always be at least one generic font
ī‚Ž font-weight can be normal, bold, bolder,
lighter or a number in range [100 â€Ļ 900]
36
CSS Rules for Fonts (2)
ī‚Ž font-style – styles the font
ī‚­ Values: normal, italic, oblique
ī‚Ž text-decoration – decorates the text
ī‚­ Values: none, underline, line-trough,
overline, blink
ī‚Ž text-align – defines the alignment of text or
other content
ī‚­ Values: left, right, center, justify
37
Shorthand Font Property
ī‚Ž font
ī‚­ Shorthand rule for setting multiple font
properties at the same time
is equal to writing this:
38
font:italic normal bold 12px/16px verdana
font-style: italic;
font-variant: normal;
font-weight: bold;
font-size: 12px;
line-height: 16px;
font-family: verdana;
Fonts
Live Demo
font-rules.html
Backgrounds
ī‚Ž background-image
ī‚­ URL of image to be used as background, e.g.:
ī‚Ž background-color
ī‚­ Using color and image and the same time
ī‚Ž background-repeat
ī‚­ repeat-x, repeat-y, repeat, no-repeat
ī‚Ž background-attachment
ī‚­ fixed / scroll
40
background-image:url("back.gif");
Backgrounds (2)
ī‚Ž background-position: specifies vertical and
horizontal position of the background image
ī‚­ Vertical position: top, center, bottom
ī‚­ Horizontal position: left, center, right
ī‚­ Both can be specified in percentage or other
numerical values
ī‚­ Examples:
41
background-position: top left;
background-position: -5px 50%;
Background Shorthand Property
ī‚Ž background: shorthand rule for setting
background properties at the same time:
is equal to writing:
ī‚­ Some browsers will not apply BOTH color and
image for background if using shorthand rule
42
background: #FFF0C0 url("back.gif") no-repeat
fixed top;
background-color: #FFF0C0;
background-image: url("back.gif");
background-repeat: no-repeat;
background-attachment: fixed;
background-position: top;
Background-image or <img>?
ī‚Ž Background images allow you to save many
image tags from the HTML
ī‚­ Leads to less code
ī‚­ More content-oriented approach
ī‚Ž All images that are not part of the page
content (and are used only for "beautification")
should be moved to the CSS
43
Background Styles
Live Demo
background-rules.html
Borders
ī‚Ž border-width: thin, medium, thick or
numerical value (e.g. 10px)
ī‚Ž border-color: color alias or RGB value
ī‚Ž border-style: none, hidden, dotted,
dashed, solid, double, groove, ridge,
inset, outset
ī‚Ž Each property can be defined separately for
left, top, bottom and right
ī‚­ border-top-style, border-left-color, â€Ļ
45
Border Shorthand Property
ī‚Ž border: shorthand rule for setting border
properties at once:
is equal to writing:
ī‚Ž Specify different borders for the sides via
shorthand rules: border-top, border-left,
border-right, border-bottom
ī‚Ž When to avoid border:0 46
border: 1px solid red
border-width:1px;
border-color:red;
border-style:solid;
Borders
Live Demo
border-rules.html
Width and Height
ī‚Ž width – defines numerical value for the width
of element, e.g. 200px
ī‚Ž height – defines numerical value for the
height of element, e.g. 100px
ī‚­ By default the height of an element is defined
by its content
ī‚­ Inline elements do not apply height, unless you
change their display style.
48
Width / Height
Live Demo
size-rules.html
Margin and Padding
ī‚Ž margin and padding define the spacing
around the element
ī‚­ Numerical value, e.g. 10px or -5px
ī‚­ Can be defined for each of the four sides
separately - margin-top, padding-left, â€Ļ
ī‚­ margin is the spacing outside of the border
ī‚­ padding is the spacing between the border and
the content
ī‚­ What are collapsing margins?
50
Margin and Padding: Short Rules
ī‚Ž margin: 5px;
ī‚­ Sets all four sides to have margin of 5 px;
ī‚Ž margin: 10px 20px;
ī‚­ top and bottom to 10px, left and right to 20px;
ī‚Ž margin: 5px 3px 8px;
ī‚­ top 5px, left/right 3px, bottom 8px
ī‚Ž margin: 1px 3px 5px 7px;
ī‚­ top, right, bottom, left (clockwise from top)
ī‚Ž Same for padding 51
Margins and Paddings
Live Demo
margins-paddings-rules.html
The Box Model
53
IE Quirks Mode
ī‚Ž When using quirks
mode (pages with no
DOCTYPE or with a
HTML 4Transitional
DOCTYPE), Internet
Explorer violates the
box model standard
54
Positioning
ī‚Ž position: defines the positioning of the
element in the page content flow
ī‚Ž The value is one of:
ī‚­ static (default)
ī‚­ relative – relative position according to where
the element would appear with static position
ī‚­ absolute – position according to the innermost
positioned parent element
ī‚­ fixed – same as absolute, but ignores page
scrolling 55
Positioning (2)
ī‚Ž MarginVS relative positioning
ī‚Ž Fixed and absolutely positioned elements do
not influence the page normal flow and usually
stay on top of other elements
ī‚­ Their position and size is ignored when
calculating the size of parent element or
position of surrounding elements
ī‚­ Overlaid according to their z-index
ī‚­ Inline fixed or absolutely positioned elements
can apply height like block-level elements
56
Positioning (3)
ī‚Ž top, left, bottom, right: specifies offset of
absolute/fixed/relative positioned element as
numerical values
ī‚Ž z-index : specifies the stack level of
positioned elements
ī‚­ understanding stacking context
57
Each positioned element creates a stacking
context.
Elements in different stacking contexts are
overlapped according to the stacking order of
their containers. For example, there is no way
for #A1 and #A2 (children of #A) to be placed
over #B without increasing the z-index of #A.
Positioning
Live Demo
positioning-rules.html
Inline element positioning
ī‚Ž vertical-align: sets the vertical-alignment
of an inline element, according to the line
height
ī‚­ Values: baseline, sub, super, top, text-top,
middle, bottom, text-bottom or numeric
ī‚Ž Also used for content of table cells (which apply
middle alignment by default)
59
Alignment and Z-Index
Live Demo
alignments-and-z-index-rules.html
Float
ī‚Ž float: the element “floats” to one side
ī‚­ left: places the element on the left and
following content on the right
ī‚­ right: places the element on the right and
following content on the left
ī‚­ floated elements should come before the
content that will wrap around them in the code
ī‚­ margins of floated elements do not collapse
ī‚­ floated inline elements can apply height
61
Float (2)
ī‚Ž How floated elements are positioned
62
Clear
ī‚Ž clear
ī‚­ Sets the sides of the element where other
floating elements are NOT allowed
ī‚­ Used to "drop" elements below floated ones or
expand a container, which contains only floated
children
ī‚­ Possible values: left, right, both
ī‚Ž Clearing floats
ī‚­ additional element (<div>) with a clear style
63
Clear (2)
ī‚Ž Clearing floats (continued)
ī‚­ :after { content: ""; display: block;
clear: both; height: 0; }
ī‚­ Triggering hasLayout in IE expands a container
of floated elements
ī‚­ display: inline-block;
ī‚­ zoom: 1;
64
Floating Elements
Live Demo
float-rules.html
Opacity
ī‚Ž opacity: specifies the opacity of the element
ī‚­ Floating point number from 0 to 1
ī‚­ For old Mozilla browsers use –moz-opacity
ī‚­ For IE use filter:alpha(opacity=value)
where value is from 0 to 100; also, "binary and
script behaviors" must be enabled and
hasLayout must be triggered, e.g. with zoom:1
66
Opacity
Live Demo
opacity-rule.html
Visibility
ī‚Ž visibility
ī‚­ Determines whether the element is visible
ī‚­ hidden: element is not rendered, but still
occupies place on the page (similar to
opacity:0)
ī‚­ visible: element is rendered normally
68
Visibility
Live Demo
visibility-rule.html
Display
ī‚Ž display: controls the display of the element
and the way it is rendered and if breaks should
be placed before and after the element
ī‚­ inline: no breaks are placed before and after
(<span> is an inline element)
ī‚­ block: breaks are placed before AND after the
element (<div> is a block element)
70
Display (2)
ī‚­ none: element is hidden and its dimensions are
not used to calculate the surrounding elements
rendering (differs from visibility: hidden!)
ī‚­ There are some more possible values, but not
all browsers support them
ī‚­ Specific displays like table-cell and table-
row
71
Display
Live Demo
display-rule.html
Overflow
ī‚Ž overflow: defines the behavior of element when
content needs more space than you have specified by
the size properties or for other reasons.Values:
ī‚­ visible (default) – content spills out of the
element
ī‚­ auto - show scrollbars if needed
ī‚­ scroll – always show scrollbars
ī‚­ hidden – any content that cannot fit is clipped
73
Overflow
Live Demo
overflow-rule.html
Other CSS Properties
ī‚Ž cursor: specifies the look of the mouse cursor
when placed over the element
ī‚­ Values: crosshair, help, pointer,
progress, move, hair, col-resize, row-
resize, text, wait, copy, drop, and others
ī‚Ž white-space – controls the line breaking of
text.Value is one of:
ī‚­ nowrap – keeps the text on one line
ī‚­ normal (default) – browser decides whether to
brake the lines if needed
75
Benefits of using CSS
ī‚Ž More powerful formatting than using
presentation tags
ī‚Ž Your pages load faster, because browsers
cache the .css files
ī‚Ž Increased accessibility, because rules can be
defined according given media
ī‚Ž Pages are easier to maintain and update
76
Maintenance Example
77
Title
Some random
text here. You
can’t read it
anyway! Har har
har! Use Css.
Title
Some random
text here. You
can’t read it
anyway! Har har
har! Use Css.
Title
Some random
text here. You
can’t read it
anyway! Har har
har! Use Css.
Title
Some random
text here. You
can’t read it
anyway! Har har
har! Use Css.
Title
Some random
text here. You
can’t read it
anyway! Har har
har! Use Css.
Title
Some random
text here. You
can’t read it
anyway! Har har
har! Use Css.
Title
Some random
text here. You
can’t read it
anyway! Har har
har! Use Css.
Title
Some random
text here. You
can’t read it
anyway! Har har
har! Use Css.
Title
Some random
text here. You
can’t read it
anyway! Har har
har! Use Css.
Title
Some random
text here. You
can’t read it
anyway! Har har
har! Use Css.
Title
Some random
text here. You
can’t read it
anyway! Har har
har! Use Css.
Title
Some random
text here. You
can’t read it
anyway! Har har
har! Use Css.
Title
Some random
text here. You
can’t read it
anyway! Har har
har! Use Css.
Title
Some random
text here. You
can’t read it
anyway! Har har
har! Use Css.
Title
Some random
text here. You
can’t read it
anyway! Har har
har! Use Css.
Title
Some random
text here. You
can’t read it
anyway! Har har
har! Use Css.
Title
Some random
text here. You
can’t read it
anyway! Har har
har! Use Css.
Title
Some random
text here. You
can’t read it
anyway! Har har
har! Use Css.
Title
Some random
text here. You
can’t read it
anyway! Har har
har! Use Css.
Title
Some random
text here. You
can’t read it
anyway! Har har
har! Use Css.
Title
Some random
text here. You
can’t read it
anyway! Har har
har! Use Css.
Title
Some random
text here. You
can’t read it
anyway! Har har
har! Use Css.
Title
Some random
text here. You
can’t read it
anyway! Har har
har! Use Css.
Title
Some random
text here. You
can’t read it
anyway! Har har
har! Use Css.
Title
Some random
text here. You
can’t read it
anyway! Har har
har! Use Css.
Title
Some random
text here. You
can’t read it
anyway! Har har
har! Use Css.
Title
Some random
text here. You
can’t read it
anyway! Har har
har! Use Css.
Title
Some random
text here. You
can’t read it
anyway! Har har
har! Use Css.
Title
Some random
text here. You
can’t read it
anyway! Har har
har! Use Css.
Title
Some random
text here. You
can’t read it
anyway! Har har
har! Use Css.
Title
Some random
text here. You
can’t read it
anyway! Har har
har! Use Css.
Title
Some random
text here. You
can’t read it
anyway! Har har
har! Use Css.
Title
Some random
text here. You
can’t read it
anyway! Har har
har! Use Css.
Title
Some random
text here. You
can’t read it
anyway! Har har
har! Use Css.
Title
Some random
text here. You
can’t read it
anyway! Har har
har! Use Css.
Title
Some random
text here. You
can’t read it
anyway! Har har
har! Use Css.
Title
Some random
text here. You
can’t read it
anyway! Har har
har! Use Css.
Title
Some random
text here. You
can’t read it
anyway! Har har
har! Use Css.
Title
Some random
text here. You
can’t read it
anyway! Har har
har! Use Css.
Title
Some random
text here. You
can’t read it
anyway! Har har
har! Use Css.
Title
Some random
text here. You
can’t read it
anyway! Har har
har! Use Css.
Title
Some random
text here. You
can’t read it
anyway! Har har
har! Use Css.
Title
Some random
text here. You
can’t read it
anyway! Har har
har! Use Css.
Title
Some random
text here. You
can’t read it
anyway! Har har
har! Use Css.
Title
Some random
text here. You
can’t read it
anyway! Har har
har! Use Css.
Title
Some random
text here. You
can’t read it
anyway! Har har
har! Use Css.
Title
Some random
text here. You
can’t read it
anyway! Har har
har! Use Css.
Title
Some random
text here. You
can’t read it
anyway! Har har
har! Use Css.
Title
Some random
text here. You
can’t read it
anyway! Har har
har! Use Css.
Title
Some random
text here. You
can’t read it
anyway! Har har
har! Use Css.
Title
Some random
text here. You
can’t read it
anyway! Har har
har! Use Css.
Title
Some random
text here. You
can’t read it
anyway! Har har
har! Use Css.
Title
Some random
text here. You
can’t read it
anyway! Har har
har! Use Css.
Title
Some random
text here. You
can’t read it
anyway! Har har
har! Use Css.
Title
Some random
text here. You
can’t read it
anyway! Har har
har! Use Css.
Title
Some random
text here. You
can’t read it
anyway! Har har
har! Use Css.
Title
Some random
text here. You
can’t read it
anyway! Har har
har! Use Css.
Title
Some random
text here. You
can’t read it
anyway! Har har
har! Use Css.
Title
Some random
text here. You
can’t read it
anyway! Har har
har! Use Css.
CSS
file
CSS DevelopmentTools
ī‚Ž Visual Studio – CSS Editor
78
CSS DevelopmentTools (2)
ī‚Ž TopStyle Lite 3.1 – Free CSSTool
ī‚­ http://www.bradsoft.com/download/
79
CSS DevelopmentTools (3)
ī‚Ž Firebug – add-on to Firefox used to examine
and adjust CSS and HTML
80
CSS DevelopmentTools (4)
ī‚Ž IE DeveloperToolbar – add-on to IE used to
examine CSS and HTML (press [F12])
81
CSS Reference
ī‚Ž A list of all CSS 2.1 properties is available at
http://www.w3.org/TR/CSS2/propidx.html
82
CSS
Questions?
http://academy.telerik.com
Exercises
1. Create the following Web
page region using HTML
with external CSS file.
Note that each program
line should be a hyperlink.
Hint: use a definition list
(<dl>)
84
Exercises (2)
85
3. Create the following Web page using HTML and
external CSS. Using tables, inline styles and
deprecated tags is not allowed.
Exercises (3)
86
2. Create the following
Web page using
external CSS styles.
Buttons should be
PNG images with text
over them.
Exercises (4)
87
4. Create the following Web page using HTML with
external CSS file. Note that the images should be
PNG with transparent background.
Exercises (5)
5. Given the picture below (CSS-Web-Site.png)
create theWeb site. Use CSS and XHTML.
88

More Related Content

Similar to CSS.pptx

Cascading Style Sheet
Cascading Style SheetCascading Style Sheet
Cascading Style SheetKushagraChadha1
 
FFW Gabrovo PMG - CSS
FFW Gabrovo PMG - CSSFFW Gabrovo PMG - CSS
FFW Gabrovo PMG - CSSToni Kolev
 
Lecture 3CSS part 1.pptx
Lecture 3CSS part 1.pptxLecture 3CSS part 1.pptx
Lecture 3CSS part 1.pptxGmachImen
 
Week3 css
Week3 cssWeek3 css
Week3 cssRowena LI
 
Css introduction
Css introductionCss introduction
Css introductionSridhar P
 
Unit 2-CSS & Bootstrap.ppt
Unit 2-CSS & Bootstrap.pptUnit 2-CSS & Bootstrap.ppt
Unit 2-CSS & Bootstrap.pptTusharTikia
 
Introduction to CSS3
Introduction to CSS3Introduction to CSS3
Introduction to CSS3RAHUL SHARMA
 
Girl Develop It Cincinnati: Intro to HTML/CSS Class 2
Girl Develop It Cincinnati: Intro to HTML/CSS Class 2Girl Develop It Cincinnati: Intro to HTML/CSS Class 2
Girl Develop It Cincinnati: Intro to HTML/CSS Class 2Erin M. Kidwell
 
Cascading Styling Sheets(CSS) simple design language intended to transform th...
Cascading Styling Sheets(CSS) simple design language intended to transform th...Cascading Styling Sheets(CSS) simple design language intended to transform th...
Cascading Styling Sheets(CSS) simple design language intended to transform th...JebaRaj26
 
Css Founder.com | Cssfounder Company
Css Founder.com | Cssfounder CompanyCss Founder.com | Cssfounder Company
Css Founder.com | Cssfounder CompanyCss Founder
 
Css Founder.com | Cssfounder Company
Css Founder.com | Cssfounder CompanyCss Founder.com | Cssfounder Company
Css Founder.com | Cssfounder CompanyCss Founder
 
Advanced Web Programming Chapter 8
Advanced Web Programming Chapter 8Advanced Web Programming Chapter 8
Advanced Web Programming Chapter 8RohanMistry15
 
Css ms megha
Css ms meghaCss ms megha
Css ms meghaMegha Gupta
 
CSS
CSS CSS
CSS Sunil OS
 
Introduction to css
Introduction to cssIntroduction to css
Introduction to cssnikhilsh66131
 
Introduction to css
Introduction to cssIntroduction to css
Introduction to cssJoseph Gabriel
 

Similar to CSS.pptx (20)

Cascading Style Sheet
Cascading Style SheetCascading Style Sheet
Cascading Style Sheet
 
FFW Gabrovo PMG - CSS
FFW Gabrovo PMG - CSSFFW Gabrovo PMG - CSS
FFW Gabrovo PMG - CSS
 
Lecture 3CSS part 1.pptx
Lecture 3CSS part 1.pptxLecture 3CSS part 1.pptx
Lecture 3CSS part 1.pptx
 
Web technology Unit-II Part-C
Web technology Unit-II Part-CWeb technology Unit-II Part-C
Web technology Unit-II Part-C
 
Week3 css
Week3 cssWeek3 css
Week3 css
 
Css introduction
Css introductionCss introduction
Css introduction
 
Unit 2-CSS & Bootstrap.ppt
Unit 2-CSS & Bootstrap.pptUnit 2-CSS & Bootstrap.ppt
Unit 2-CSS & Bootstrap.ppt
 
Pfnp slides
Pfnp slidesPfnp slides
Pfnp slides
 
Introduction to CSS3
Introduction to CSS3Introduction to CSS3
Introduction to CSS3
 
Girl Develop It Cincinnati: Intro to HTML/CSS Class 2
Girl Develop It Cincinnati: Intro to HTML/CSS Class 2Girl Develop It Cincinnati: Intro to HTML/CSS Class 2
Girl Develop It Cincinnati: Intro to HTML/CSS Class 2
 
Cascading Styling Sheets(CSS) simple design language intended to transform th...
Cascading Styling Sheets(CSS) simple design language intended to transform th...Cascading Styling Sheets(CSS) simple design language intended to transform th...
Cascading Styling Sheets(CSS) simple design language intended to transform th...
 
Css.html
Css.htmlCss.html
Css.html
 
Css Founder.com | Cssfounder Company
Css Founder.com | Cssfounder CompanyCss Founder.com | Cssfounder Company
Css Founder.com | Cssfounder Company
 
Css Founder.com | Cssfounder Company
Css Founder.com | Cssfounder CompanyCss Founder.com | Cssfounder Company
Css Founder.com | Cssfounder Company
 
Advanced Web Programming Chapter 8
Advanced Web Programming Chapter 8Advanced Web Programming Chapter 8
Advanced Web Programming Chapter 8
 
Css ms megha
Css ms meghaCss ms megha
Css ms megha
 
CSS
CSS CSS
CSS
 
Introduction to css
Introduction to cssIntroduction to css
Introduction to css
 
Css basics
Css basicsCss basics
Css basics
 
Introduction to css
Introduction to cssIntroduction to css
Introduction to css
 

More from VijayKumarLokanadam

crop disease classification using machine learning
crop disease classification using machine learningcrop disease classification using machine learning
crop disease classification using machine learningVijayKumarLokanadam
 
cs-171-05-LocalSearch.pptx
cs-171-05-LocalSearch.pptxcs-171-05-LocalSearch.pptx
cs-171-05-LocalSearch.pptxVijayKumarLokanadam
 
MIDWAY PROJECT PRESENTATION.pptx
MIDWAY PROJECT PRESENTATION.pptxMIDWAY PROJECT PRESENTATION.pptx
MIDWAY PROJECT PRESENTATION.pptxVijayKumarLokanadam
 
dizital pods session 6-arrays.ppsx
dizital pods session 6-arrays.ppsxdizital pods session 6-arrays.ppsx
dizital pods session 6-arrays.ppsxVijayKumarLokanadam
 
dizital pods session 6-arrays.pptx
dizital pods session 6-arrays.pptxdizital pods session 6-arrays.pptx
dizital pods session 6-arrays.pptxVijayKumarLokanadam
 
dizital pods session 5-loops.pptx
dizital pods session 5-loops.pptxdizital pods session 5-loops.pptx
dizital pods session 5-loops.pptxVijayKumarLokanadam
 
dizital pods session 3.pptx
dizital pods session 3.pptxdizital pods session 3.pptx
dizital pods session 3.pptxVijayKumarLokanadam
 
dizital pods session 2.pptx
dizital pods session 2.pptxdizital pods session 2.pptx
dizital pods session 2.pptxVijayKumarLokanadam
 
dizital pods session 1.pptx
dizital pods session 1.pptxdizital pods session 1.pptx
dizital pods session 1.pptxVijayKumarLokanadam
 

More from VijayKumarLokanadam (14)

crop disease classification using machine learning
crop disease classification using machine learningcrop disease classification using machine learning
crop disease classification using machine learning
 
cs-171-05-LocalSearch.pptx
cs-171-05-LocalSearch.pptxcs-171-05-LocalSearch.pptx
cs-171-05-LocalSearch.pptx
 
MIDWAY PROJECT PRESENTATION.pptx
MIDWAY PROJECT PRESENTATION.pptxMIDWAY PROJECT PRESENTATION.pptx
MIDWAY PROJECT PRESENTATION.pptx
 
trees.ppt
trees.ppttrees.ppt
trees.ppt
 
css basics.pptx
css basics.pptxcss basics.pptx
css basics.pptx
 
dizital pods session 6-arrays.ppsx
dizital pods session 6-arrays.ppsxdizital pods session 6-arrays.ppsx
dizital pods session 6-arrays.ppsx
 
dizital pods session 6-arrays.pptx
dizital pods session 6-arrays.pptxdizital pods session 6-arrays.pptx
dizital pods session 6-arrays.pptx
 
dizital pods session 5-loops.pptx
dizital pods session 5-loops.pptxdizital pods session 5-loops.pptx
dizital pods session 5-loops.pptx
 
realtimeobject (2).pptx
realtimeobject (2).pptxrealtimeobject (2).pptx
realtimeobject (2).pptx
 
dizital pods session 3.pptx
dizital pods session 3.pptxdizital pods session 3.pptx
dizital pods session 3.pptx
 
dizital pods session 2.pptx
dizital pods session 2.pptxdizital pods session 2.pptx
dizital pods session 2.pptx
 
dizital pods session 1.pptx
dizital pods session 1.pptxdizital pods session 1.pptx
dizital pods session 1.pptx
 
Prolog.pptx
Prolog.pptxProlog.pptx
Prolog.pptx
 
UNIT 3 web iiiBCA.pptx
UNIT 3 web iiiBCA.pptxUNIT 3 web iiiBCA.pptx
UNIT 3 web iiiBCA.pptx
 

Recently uploaded

How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)Damian Radcliffe
 
Challengers I Told Ya ShirtChallengers I Told Ya Shirt
Challengers I Told Ya ShirtChallengers I Told Ya ShirtChallengers I Told Ya ShirtChallengers I Told Ya Shirt
Challengers I Told Ya ShirtChallengers I Told Ya Shirtrahman018755
 
VIP Kolkata Call Girls Salt Lake 8250192130 Available With Room
VIP Kolkata Call Girls Salt Lake 8250192130 Available With RoomVIP Kolkata Call Girls Salt Lake 8250192130 Available With Room
VIP Kolkata Call Girls Salt Lake 8250192130 Available With Roomgirls4nights
 
Networking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOGNetworking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOGAPNIC
 
Call Girls Service Chandigarh Lucky ❤ī¸ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤ī¸ 7710465962 Independent Call Girls In C...Call Girls Service Chandigarh Lucky ❤ī¸ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤ī¸ 7710465962 Independent Call Girls In C...Sheetaleventcompany
 
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptxAWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptxellan12
 
10.pdfMature Call girls in Dubai +971563133746 Dubai Call girls
10.pdfMature Call girls in Dubai +971563133746 Dubai Call girls10.pdfMature Call girls in Dubai +971563133746 Dubai Call girls
10.pdfMature Call girls in Dubai +971563133746 Dubai Call girlsstephieert
 
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...APNIC
 
VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With RoomVIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Roomishabajaj13
 
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark WebGDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark WebJames Anderson
 
Gram Darshan PPT cyber rural in villages of india
Gram Darshan PPT cyber rural  in villages of indiaGram Darshan PPT cyber rural  in villages of india
Gram Darshan PPT cyber rural in villages of indiaimessage0108
 
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012rehmti665
 
On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024APNIC
 
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)Dana Luther
 
Call Girls In Model Towh Delhi đŸ’¯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi đŸ’¯Call Us 🔝8264348440🔝Call Girls In Model Towh Delhi đŸ’¯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi đŸ’¯Call Us 🔝8264348440🔝soniya singh
 
Low Rate Call Girls Kolkata Avani 🤌 8250192130 🚀 Vip Call Girls Kolkata
Low Rate Call Girls Kolkata Avani 🤌  8250192130 🚀 Vip Call Girls KolkataLow Rate Call Girls Kolkata Avani 🤌  8250192130 🚀 Vip Call Girls Kolkata
Low Rate Call Girls Kolkata Avani 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 
Russian Call girls in Dubai +971563133746 Dubai Call girls
Russian  Call girls in Dubai +971563133746 Dubai  Call girlsRussian  Call girls in Dubai +971563133746 Dubai  Call girls
Russian Call girls in Dubai +971563133746 Dubai Call girlsstephieert
 

Recently uploaded (20)

How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)
 
Challengers I Told Ya ShirtChallengers I Told Ya Shirt
Challengers I Told Ya ShirtChallengers I Told Ya ShirtChallengers I Told Ya ShirtChallengers I Told Ya Shirt
Challengers I Told Ya ShirtChallengers I Told Ya Shirt
 
VIP Kolkata Call Girls Salt Lake 8250192130 Available With Room
VIP Kolkata Call Girls Salt Lake 8250192130 Available With RoomVIP Kolkata Call Girls Salt Lake 8250192130 Available With Room
VIP Kolkata Call Girls Salt Lake 8250192130 Available With Room
 
Networking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOGNetworking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOG
 
Model Call Girl in Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in  Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in  Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
 
Call Girls Service Chandigarh Lucky ❤ī¸ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤ī¸ 7710465962 Independent Call Girls In C...Call Girls Service Chandigarh Lucky ❤ī¸ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤ī¸ 7710465962 Independent Call Girls In C...
 
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptxAWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
 
10.pdfMature Call girls in Dubai +971563133746 Dubai Call girls
10.pdfMature Call girls in Dubai +971563133746 Dubai Call girls10.pdfMature Call girls in Dubai +971563133746 Dubai Call girls
10.pdfMature Call girls in Dubai +971563133746 Dubai Call girls
 
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
 
VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With RoomVIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Room
 
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark WebGDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
 
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No AdvanceRohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
 
Gram Darshan PPT cyber rural in villages of india
Gram Darshan PPT cyber rural  in villages of indiaGram Darshan PPT cyber rural  in villages of india
Gram Darshan PPT cyber rural in villages of india
 
Rohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No AdvanceRohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
 
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
 
On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024
 
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
 
Call Girls In Model Towh Delhi đŸ’¯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi đŸ’¯Call Us 🔝8264348440🔝Call Girls In Model Towh Delhi đŸ’¯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi đŸ’¯Call Us 🔝8264348440🔝
 
Low Rate Call Girls Kolkata Avani 🤌 8250192130 🚀 Vip Call Girls Kolkata
Low Rate Call Girls Kolkata Avani 🤌  8250192130 🚀 Vip Call Girls KolkataLow Rate Call Girls Kolkata Avani 🤌  8250192130 🚀 Vip Call Girls Kolkata
Low Rate Call Girls Kolkata Avani 🤌 8250192130 🚀 Vip Call Girls Kolkata
 
Russian Call girls in Dubai +971563133746 Dubai Call girls
Russian  Call girls in Dubai +971563133746 Dubai  Call girlsRussian  Call girls in Dubai +971563133746 Dubai  Call girls
Russian Call girls in Dubai +971563133746 Dubai Call girls
 

CSS.pptx

  • 1. Introduction to Cascading Style Sheets (CSS) Svetlin Nakov Telerik Corporation www.telerik.com
  • 2. Table of Contents ī‚Ž What is CSS? ī‚Ž Styling with Cascading Stylesheets (CSS) ī‚Ž Selectors and style definitions ī‚Ž Linking HTML and CSS ī‚Ž Fonts, Backgrounds, Borders ī‚Ž The Box Model in W3C and IE ī‚Ž Alignment, Z-Index, Margin, Padding ī‚Ž Positioning and Floating Elements ī‚Ž Visibility, Display, Overflow 2
  • 3. CSS: A New Philosophy ī‚Ž Separate content from presentation! 3 Title Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Suspendisse at pede ut purus malesuada dictum. Donec vitae neque non magna aliquam dictum. â€ĸ Vestibulum et odio et ipsum â€ĸ accumsan accumsan. Morbi at â€ĸ arcu vel elit ultricies porta. Proin tortor purus, luctus non, aliquam nec, interdum vel, mi. Sed nec quam nec odio lacinia molestie. Praesent augue tortor, convallis eget, euismod nonummy, lacinia ut, risus. Bold Italics Indent Content (HTML document) Presentation (CSS Document)
  • 4. The Resulting Page 4 Title Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Suspendisse at pede ut purus malesuada dictum. Donec vitae neque non magna aliquam dictum. â€ĸ Vestibulum et odio et ipsum â€ĸ accumsan accumsan. Morbi at â€ĸ arcu vel elit ultricies porta. Proin Tortor purus, luctus non, aliquam nec, interdum vel, mi. Sed nec quam nec odio lacinia molestie. Praesent augue tortor, convallis eget, euismod nonummy, lacinia ut, risus.
  • 5. CSS Intro Styling with Cascading Stylesheets
  • 6. CSS Introduction ī‚Ž Cascading Style Sheets (CSS) ī‚­ Used to describe the presentation of documents ī‚­ Define sizes, spacing, fonts, colors, layout, etc. ī‚­ Improve content accessibility ī‚­ Improve flexibility ī‚Ž Designed to separate presentation from content ī‚Ž Due to CSS, all HTML presentation tags and attributes are deprecated, e.g. font, center, etc. 6
  • 7. CSS Introduction (2) ī‚Ž CSS can be applied to any XML document ī‚­ Not just to HTML / XHTML ī‚Ž CSS can specify different styles for different media ī‚­ On-screen ī‚­ In print ī‚­ Handheld, projection, etc. ī‚­ â€Ļ even by voice or Braille-based reader 7
  • 8. Why “Cascading”? ī‚Ž Priority scheme determining which style rules apply to element ī‚­ Cascade priorities or specificity (weight) are calculated and assigned to the rules ī‚­ Child elements in the HTML DOM tree inherit styles from their parent ī‚­ Can override them ī‚­ Control via !important rule 8
  • 10. Why “Cascading”? (3) ī‚Ž Some CSS styles are inherited and some not ī‚­ Text-related and list-related properties are inherited - color, font-size, font-family, line-height, text-align, list-style, etc ī‚­ Box-related and positioning styles are not inherited - width, height, border, margin, padding, position, float, etc ī‚­ <a> elements do not inherit color and text- decoration 10
  • 11. Style Sheets Syntax ī‚Ž Stylesheets consist of rules, selectors, declarations, properties and values ī‚Ž Selectors are separated by commas ī‚Ž Declarations are separated by semicolons ī‚Ž Properties and values are separated by colons 11 h1,h2,h3 { color: green; font-weight: bold; } http://css.maxdesign.com.au/
  • 12. Selectors ī‚Ž Selectors determine which element the rule applies to: ī‚­ All elements of specific type (tag) ī‚­ Those that mach a specific attribute (id, class) ī‚­ Elements may be matched depending on how they are nested in the document tree (HTML) ī‚Ž Examples: 12 .header a { color: green } #menu>li { padding-top: 8px }
  • 13. Selectors (2) ī‚Ž Three primary kinds of selectors: ī‚­ By tag (type selector): ī‚­ By element id: ī‚­ By element class name (only for HTML): ī‚Ž Selectors can be combined with commas: This will match <h1> tags, elements with class link, and element with id top-link 13 h1 { font-family: verdana,sans-serif; } #element_id { color: #ff0000; } .myClass {border: 1px solid red} h1, .link, #top-link {font-weight: bold}
  • 14. Selectors (3) ī‚Ž Pseudo-classes define state ī‚­ :hover, :visited, :active , :lang ī‚Ž Pseudo-elements define element "parts" or are used to generate content ī‚­ :first-line , :before, :after 14 a:hover { color: red; } p:first-line { text-transform: uppercase; } .title:before { content: "Âģ"; } .title:after { content: "ÂĢ"; }
  • 15. Selectors (4) ī‚Ž Match relative to element placement: This will match all <a> tags that are inside of <p> ī‚Ž * – universal selector (avoid or use with care!): This will match all descendants of <p> element ī‚Ž + selector – used to match “next sibling”: This will match all siblings with class name link that appear immediately after <img> tag 15 p a {text-decoration: underline} p * {color: black} img + .link {float:right}
  • 16. Selectors (5) ī‚Ž > selector – matches direct child nodes: This will match all elements with class error, direct children of <p> tag ī‚Ž [ ] – matches tag attributes by regular expression: This will match all <img> tags with alt attribute containing the word logo ī‚Ž .class1.class2 (no space) - matches elements with both (all) classes applied at the same time 16 p > .error {font-size: 8px} img[alt~=logo] {border: none}
  • 17. Values in the CSS Rules ī‚Ž Colors are set in RGB format (decimal or hex): ī‚­ Example: #a0a6aa = rgb(160, 166, 170) ī‚­ Predefined color aliases exist: black, blue, etc. ī‚Ž Numeric values are specified in: ī‚­ Pixels, ems, e.g. 12px , 1.4em ī‚­ Points, inches, centimeters, millimeters ī‚­ E.g. 10pt , 1in, 1cm, 1mm ī‚­ Percentages, e.g. 50% ī‚­ Percentage of what?... ī‚­ Zero can be used with no unit: border: 0; 17
  • 18. Default Browser Styles ī‚Ž Browsers have default CSS styles ī‚­ Used when there is no CSS information or any other style information in the document ī‚Ž Caution: default styles differ in browsers ī‚­ E.g. margins, paddings and font sizes differ most often and usually developers reset them 18 * { margin: 0; padding: 0; } body, h1, p, ul, li { margin: 0; padding: 0; }
  • 19. Linking HTML and CSS ī‚Ž HTML (content) and CSS (presentation) can be linked in three ways: ī‚­ Inline: the CSS rules in the style attribute ī‚­ No selectors are needed ī‚­ Embedded: in the <head> in a <style> tag ī‚­ External: CSS rules in separate file (best) ī‚­ Usually a file with .css extension ī‚­ Linked via <link rel="stylesheet" href=â€Ļ> tag or @import directive in embedded CSS block 19
  • 20. Linking HTML and CSS (2) ī‚Ž Using external files is highly recommended ī‚­ Simplifies the HTML document ī‚­ Improves page load speed as the CSS file is cached 20
  • 21. Inline Styles: Example 21 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/ DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Inline Styles</title> </head> <body> <p>Here is some text</p> <!--Separate multiple styles with a semicolon--> <p style="font-size: 20pt">Here is some more text</p> <p style="font-size: 20pt;color: #0000FF" >Even more text</p> </body> </html> inline-styles.html
  • 22. Inline Styles: Example 22 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/ DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Inline Styles</title> </head> <body> <p>Here is some text</p> <!--Separate multiple styles with a semicolon--> <p style="font-size: 20pt">Here is some more text</p> <p style="font-size: 20pt;color: #0000FF" >Even more text</p> </body> </html> inline-styles.html
  • 23. CSS Cascade (Precedence) ī‚Ž There are browser, user and author stylesheets with "normal" and "important" declarations ī‚­ Browser styles (least priority) ī‚­ Normal user styles ī‚­ Normal author styles (external, in head, inline) ī‚­ Important author styles ī‚­ Important user styles (max priority) 23 a { color: red !important ; } http://www.slideshare.net/maxdesign/css-cascade-1658158
  • 24. CSS Specificity ī‚Ž CSS specificity is used to determine the precedence of CSS style declarations with the same origin. Selectors are what matters ī‚­ Simple calculation: #id = 100, .class = 10, :pseudo = 10, [attr] = 10, tag = 1, * = 0 ī‚­ Same number of points? Order matters. ī‚­ See also: ī‚­ http://www.smashingmagazine.com/2007/07/27/css-specificity-things- you-should-know/ ī‚­ http://css.maxdesign.com.au/selectutorial/advanced_conflict.htm 24
  • 25. CSS Rules Precedence Live Demo precedence.html
  • 26. Embedded Styles ī‚Ž Embedded in the HTML in the <style> tag: ī‚­ The <style> tag is placed in the <head> section of the document ī‚­ type attribute specifies the MIME type ī‚­ MIME describes the format of the content ī‚­ Other MIME types include text/html, image/gif, text/javascript â€Ļ ī‚Ž Used for document-specific styles 26 <style type="text/css">
  • 27. Embedded Styles: Example 27 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1- transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Style Sheets</title> <style type="text/css"> em {background-color:#8000FF; color:white} h1 {font-family:Arial, sans-serif} p {font-size:18pt} .blue {color:blue} </style> <head> embedded-stylesheets.html
  • 28. Embedded Styles: Example (2) 28 â€Ļ <body> <h1 class="blue">A Heading</h1> <p>Here is some text. Here is some text. Here is some text. Here is some text. Here is some text.</p> <h1>Another Heading</h1> <p class="blue">Here is some more text. Here is some more text.</p> <p class="blue">Here is some <em>more</em> text. Here is some more text.</p> </body> </html>
  • 29. â€Ļ <body> <h1 class="blue">A Heading</h1> <p>Here is some text. Here is some text. Here is some text. Here is some text. Here is some text.</p> <h1>Another Heading</h1> <p class="blue">Here is some more text. Here is some more text.</p> <p class="blue">Here is some <em>more</em> text. Here is some more text.</p> </body> </html> Embedded Styles: Example (3) 29
  • 30. External CSS Styles ī‚Ž External linking ī‚­ Separate pages can all use a shared style sheet ī‚­ Only modify a single file to change the styles across your entire Web site (see http://www.csszengarden.com/) ī‚Ž link tag (with a rel attribute) ī‚­ Specifies a relationship between current document and another document ī‚­ link elements should be in the <head> 30 <link rel="stylesheet" type="text/css" href="styles.css">
  • 31. External CSS Styles (2) @import ī‚­ Another way to link external CSS files ī‚­ Example: ī‚­ Ancient browsers do not recognize @import ī‚­ Use @import in an external CSS file to workaround the IE 32 CSS file limit 31 <style type="text/css"> @import url("styles.css"); /* same as */ @import "styles.css"; </style>
  • 32. External Styles: Example 32 /* CSS Document */ a { text-decoration: none } a:hover { text-decoration: underline; color: red; background-color: #CCFFCC } li em { color: red; font-weight: bold } ul { margin-left: 2cm } ul ul { text-decoration: underline; margin-left: .5cm } styles.css
  • 33. External Styles: Example (2) 33 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1- transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Importing style sheets</title> <link type="text/css" rel="stylesheet" href="styles.css" /> </head> <body> <h1>Shopping list for <em>Monday</em>:</h1> <li>Milk</li> â€Ļ external-styles.html
  • 34. External Styles: Example (3) 34 â€Ļ <li>Bread <ul> <li>White bread</li> <li>Rye bread</li> <li>Whole wheat bread</li> </ul> </li> <li>Rice</li> <li>Potatoes</li> <li>Pizza <em>with mushrooms</em></li> </ul> <a href="http://food.com" title="grocery store">Go to the Grocery store</a> </body> </html>
  • 35. â€Ļ <li>Bread <ul> <li>White bread</li> <li>Rye bread</li> <li>Whole wheat bread</li> </ul> </li> <li>Rice</li> <li>Potatoes</li> <li>Pizza <em>with mushrooms</em></li> </ul> <a href="http://food.com" title="grocery store">Go to the Grocery store</a> </body> </html> External Styles: Example (4) 35
  • 36. Text-related CSS Properties ī‚Ž color – specifies the color of the text ī‚Ž font-size – size of font: xx-small, x-small, small, medium, large, x-large, xx-large, smaller, larger or numeric value ī‚Ž font-family – comma separated font names ī‚­ Example: verdana, sans-serif, etc. ī‚­ The browser loads the first one that is available ī‚­ There should always be at least one generic font ī‚Ž font-weight can be normal, bold, bolder, lighter or a number in range [100 â€Ļ 900] 36
  • 37. CSS Rules for Fonts (2) ī‚Ž font-style – styles the font ī‚­ Values: normal, italic, oblique ī‚Ž text-decoration – decorates the text ī‚­ Values: none, underline, line-trough, overline, blink ī‚Ž text-align – defines the alignment of text or other content ī‚­ Values: left, right, center, justify 37
  • 38. Shorthand Font Property ī‚Ž font ī‚­ Shorthand rule for setting multiple font properties at the same time is equal to writing this: 38 font:italic normal bold 12px/16px verdana font-style: italic; font-variant: normal; font-weight: bold; font-size: 12px; line-height: 16px; font-family: verdana;
  • 40. Backgrounds ī‚Ž background-image ī‚­ URL of image to be used as background, e.g.: ī‚Ž background-color ī‚­ Using color and image and the same time ī‚Ž background-repeat ī‚­ repeat-x, repeat-y, repeat, no-repeat ī‚Ž background-attachment ī‚­ fixed / scroll 40 background-image:url("back.gif");
  • 41. Backgrounds (2) ī‚Ž background-position: specifies vertical and horizontal position of the background image ī‚­ Vertical position: top, center, bottom ī‚­ Horizontal position: left, center, right ī‚­ Both can be specified in percentage or other numerical values ī‚­ Examples: 41 background-position: top left; background-position: -5px 50%;
  • 42. Background Shorthand Property ī‚Ž background: shorthand rule for setting background properties at the same time: is equal to writing: ī‚­ Some browsers will not apply BOTH color and image for background if using shorthand rule 42 background: #FFF0C0 url("back.gif") no-repeat fixed top; background-color: #FFF0C0; background-image: url("back.gif"); background-repeat: no-repeat; background-attachment: fixed; background-position: top;
  • 43. Background-image or <img>? ī‚Ž Background images allow you to save many image tags from the HTML ī‚­ Leads to less code ī‚­ More content-oriented approach ī‚Ž All images that are not part of the page content (and are used only for "beautification") should be moved to the CSS 43
  • 45. Borders ī‚Ž border-width: thin, medium, thick or numerical value (e.g. 10px) ī‚Ž border-color: color alias or RGB value ī‚Ž border-style: none, hidden, dotted, dashed, solid, double, groove, ridge, inset, outset ī‚Ž Each property can be defined separately for left, top, bottom and right ī‚­ border-top-style, border-left-color, â€Ļ 45
  • 46. Border Shorthand Property ī‚Ž border: shorthand rule for setting border properties at once: is equal to writing: ī‚Ž Specify different borders for the sides via shorthand rules: border-top, border-left, border-right, border-bottom ī‚Ž When to avoid border:0 46 border: 1px solid red border-width:1px; border-color:red; border-style:solid;
  • 48. Width and Height ī‚Ž width – defines numerical value for the width of element, e.g. 200px ī‚Ž height – defines numerical value for the height of element, e.g. 100px ī‚­ By default the height of an element is defined by its content ī‚­ Inline elements do not apply height, unless you change their display style. 48
  • 49. Width / Height Live Demo size-rules.html
  • 50. Margin and Padding ī‚Ž margin and padding define the spacing around the element ī‚­ Numerical value, e.g. 10px or -5px ī‚­ Can be defined for each of the four sides separately - margin-top, padding-left, â€Ļ ī‚­ margin is the spacing outside of the border ī‚­ padding is the spacing between the border and the content ī‚­ What are collapsing margins? 50
  • 51. Margin and Padding: Short Rules ī‚Ž margin: 5px; ī‚­ Sets all four sides to have margin of 5 px; ī‚Ž margin: 10px 20px; ī‚­ top and bottom to 10px, left and right to 20px; ī‚Ž margin: 5px 3px 8px; ī‚­ top 5px, left/right 3px, bottom 8px ī‚Ž margin: 1px 3px 5px 7px; ī‚­ top, right, bottom, left (clockwise from top) ī‚Ž Same for padding 51
  • 52. Margins and Paddings Live Demo margins-paddings-rules.html
  • 54. IE Quirks Mode ī‚Ž When using quirks mode (pages with no DOCTYPE or with a HTML 4Transitional DOCTYPE), Internet Explorer violates the box model standard 54
  • 55. Positioning ī‚Ž position: defines the positioning of the element in the page content flow ī‚Ž The value is one of: ī‚­ static (default) ī‚­ relative – relative position according to where the element would appear with static position ī‚­ absolute – position according to the innermost positioned parent element ī‚­ fixed – same as absolute, but ignores page scrolling 55
  • 56. Positioning (2) ī‚Ž MarginVS relative positioning ī‚Ž Fixed and absolutely positioned elements do not influence the page normal flow and usually stay on top of other elements ī‚­ Their position and size is ignored when calculating the size of parent element or position of surrounding elements ī‚­ Overlaid according to their z-index ī‚­ Inline fixed or absolutely positioned elements can apply height like block-level elements 56
  • 57. Positioning (3) ī‚Ž top, left, bottom, right: specifies offset of absolute/fixed/relative positioned element as numerical values ī‚Ž z-index : specifies the stack level of positioned elements ī‚­ understanding stacking context 57 Each positioned element creates a stacking context. Elements in different stacking contexts are overlapped according to the stacking order of their containers. For example, there is no way for #A1 and #A2 (children of #A) to be placed over #B without increasing the z-index of #A.
  • 59. Inline element positioning ī‚Ž vertical-align: sets the vertical-alignment of an inline element, according to the line height ī‚­ Values: baseline, sub, super, top, text-top, middle, bottom, text-bottom or numeric ī‚Ž Also used for content of table cells (which apply middle alignment by default) 59
  • 60. Alignment and Z-Index Live Demo alignments-and-z-index-rules.html
  • 61. Float ī‚Ž float: the element “floats” to one side ī‚­ left: places the element on the left and following content on the right ī‚­ right: places the element on the right and following content on the left ī‚­ floated elements should come before the content that will wrap around them in the code ī‚­ margins of floated elements do not collapse ī‚­ floated inline elements can apply height 61
  • 62. Float (2) ī‚Ž How floated elements are positioned 62
  • 63. Clear ī‚Ž clear ī‚­ Sets the sides of the element where other floating elements are NOT allowed ī‚­ Used to "drop" elements below floated ones or expand a container, which contains only floated children ī‚­ Possible values: left, right, both ī‚Ž Clearing floats ī‚­ additional element (<div>) with a clear style 63
  • 64. Clear (2) ī‚Ž Clearing floats (continued) ī‚­ :after { content: ""; display: block; clear: both; height: 0; } ī‚­ Triggering hasLayout in IE expands a container of floated elements ī‚­ display: inline-block; ī‚­ zoom: 1; 64
  • 66. Opacity ī‚Ž opacity: specifies the opacity of the element ī‚­ Floating point number from 0 to 1 ī‚­ For old Mozilla browsers use –moz-opacity ī‚­ For IE use filter:alpha(opacity=value) where value is from 0 to 100; also, "binary and script behaviors" must be enabled and hasLayout must be triggered, e.g. with zoom:1 66
  • 68. Visibility ī‚Ž visibility ī‚­ Determines whether the element is visible ī‚­ hidden: element is not rendered, but still occupies place on the page (similar to opacity:0) ī‚­ visible: element is rendered normally 68
  • 70. Display ī‚Ž display: controls the display of the element and the way it is rendered and if breaks should be placed before and after the element ī‚­ inline: no breaks are placed before and after (<span> is an inline element) ī‚­ block: breaks are placed before AND after the element (<div> is a block element) 70
  • 71. Display (2) ī‚­ none: element is hidden and its dimensions are not used to calculate the surrounding elements rendering (differs from visibility: hidden!) ī‚­ There are some more possible values, but not all browsers support them ī‚­ Specific displays like table-cell and table- row 71
  • 73. Overflow ī‚Ž overflow: defines the behavior of element when content needs more space than you have specified by the size properties or for other reasons.Values: ī‚­ visible (default) – content spills out of the element ī‚­ auto - show scrollbars if needed ī‚­ scroll – always show scrollbars ī‚­ hidden – any content that cannot fit is clipped 73
  • 75. Other CSS Properties ī‚Ž cursor: specifies the look of the mouse cursor when placed over the element ī‚­ Values: crosshair, help, pointer, progress, move, hair, col-resize, row- resize, text, wait, copy, drop, and others ī‚Ž white-space – controls the line breaking of text.Value is one of: ī‚­ nowrap – keeps the text on one line ī‚­ normal (default) – browser decides whether to brake the lines if needed 75
  • 76. Benefits of using CSS ī‚Ž More powerful formatting than using presentation tags ī‚Ž Your pages load faster, because browsers cache the .css files ī‚Ž Increased accessibility, because rules can be defined according given media ī‚Ž Pages are easier to maintain and update 76
  • 77. Maintenance Example 77 Title Some random text here. You can’t read it anyway! Har har har! Use Css. Title Some random text here. You can’t read it anyway! Har har har! Use Css. Title Some random text here. You can’t read it anyway! Har har har! Use Css. Title Some random text here. You can’t read it anyway! Har har har! Use Css. Title Some random text here. You can’t read it anyway! Har har har! Use Css. Title Some random text here. You can’t read it anyway! Har har har! Use Css. Title Some random text here. You can’t read it anyway! Har har har! Use Css. Title Some random text here. You can’t read it anyway! Har har har! Use Css. Title Some random text here. You can’t read it anyway! Har har har! Use Css. Title Some random text here. You can’t read it anyway! Har har har! Use Css. Title Some random text here. You can’t read it anyway! Har har har! Use Css. Title Some random text here. You can’t read it anyway! Har har har! Use Css. Title Some random text here. You can’t read it anyway! Har har har! Use Css. Title Some random text here. You can’t read it anyway! Har har har! Use Css. Title Some random text here. You can’t read it anyway! Har har har! Use Css. Title Some random text here. You can’t read it anyway! Har har har! Use Css. Title Some random text here. You can’t read it anyway! Har har har! Use Css. Title Some random text here. You can’t read it anyway! Har har har! Use Css. Title Some random text here. You can’t read it anyway! Har har har! Use Css. Title Some random text here. You can’t read it anyway! Har har har! Use Css. Title Some random text here. You can’t read it anyway! Har har har! Use Css. Title Some random text here. You can’t read it anyway! Har har har! Use Css. Title Some random text here. You can’t read it anyway! Har har har! Use Css. Title Some random text here. You can’t read it anyway! Har har har! Use Css. Title Some random text here. You can’t read it anyway! Har har har! Use Css. Title Some random text here. You can’t read it anyway! Har har har! Use Css. Title Some random text here. You can’t read it anyway! Har har har! Use Css. Title Some random text here. You can’t read it anyway! Har har har! Use Css. Title Some random text here. You can’t read it anyway! Har har har! Use Css. Title Some random text here. You can’t read it anyway! Har har har! Use Css. Title Some random text here. You can’t read it anyway! Har har har! Use Css. Title Some random text here. You can’t read it anyway! Har har har! Use Css. Title Some random text here. You can’t read it anyway! Har har har! Use Css. Title Some random text here. You can’t read it anyway! Har har har! Use Css. Title Some random text here. You can’t read it anyway! Har har har! Use Css. Title Some random text here. You can’t read it anyway! Har har har! Use Css. Title Some random text here. You can’t read it anyway! Har har har! Use Css. Title Some random text here. You can’t read it anyway! Har har har! Use Css. Title Some random text here. You can’t read it anyway! Har har har! Use Css. Title Some random text here. You can’t read it anyway! Har har har! Use Css. Title Some random text here. You can’t read it anyway! Har har har! Use Css. Title Some random text here. You can’t read it anyway! Har har har! Use Css. Title Some random text here. You can’t read it anyway! Har har har! Use Css. Title Some random text here. You can’t read it anyway! Har har har! Use Css. Title Some random text here. You can’t read it anyway! Har har har! Use Css. Title Some random text here. You can’t read it anyway! Har har har! Use Css. Title Some random text here. You can’t read it anyway! Har har har! Use Css. Title Some random text here. You can’t read it anyway! Har har har! Use Css. Title Some random text here. You can’t read it anyway! Har har har! Use Css. Title Some random text here. You can’t read it anyway! Har har har! Use Css. Title Some random text here. You can’t read it anyway! Har har har! Use Css. Title Some random text here. You can’t read it anyway! Har har har! Use Css. Title Some random text here. You can’t read it anyway! Har har har! Use Css. Title Some random text here. You can’t read it anyway! Har har har! Use Css. Title Some random text here. You can’t read it anyway! Har har har! Use Css. Title Some random text here. You can’t read it anyway! Har har har! Use Css. Title Some random text here. You can’t read it anyway! Har har har! Use Css. Title Some random text here. You can’t read it anyway! Har har har! Use Css. Title Some random text here. You can’t read it anyway! Har har har! Use Css. CSS file
  • 78. CSS DevelopmentTools ī‚Ž Visual Studio – CSS Editor 78
  • 79. CSS DevelopmentTools (2) ī‚Ž TopStyle Lite 3.1 – Free CSSTool ī‚­ http://www.bradsoft.com/download/ 79
  • 80. CSS DevelopmentTools (3) ī‚Ž Firebug – add-on to Firefox used to examine and adjust CSS and HTML 80
  • 81. CSS DevelopmentTools (4) ī‚Ž IE DeveloperToolbar – add-on to IE used to examine CSS and HTML (press [F12]) 81
  • 82. CSS Reference ī‚Ž A list of all CSS 2.1 properties is available at http://www.w3.org/TR/CSS2/propidx.html 82
  • 84. Exercises 1. Create the following Web page region using HTML with external CSS file. Note that each program line should be a hyperlink. Hint: use a definition list (<dl>) 84
  • 85. Exercises (2) 85 3. Create the following Web page using HTML and external CSS. Using tables, inline styles and deprecated tags is not allowed.
  • 86. Exercises (3) 86 2. Create the following Web page using external CSS styles. Buttons should be PNG images with text over them.
  • 87. Exercises (4) 87 4. Create the following Web page using HTML with external CSS file. Note that the images should be PNG with transparent background.
  • 88. Exercises (5) 5. Given the picture below (CSS-Web-Site.png) create theWeb site. Use CSS and XHTML. 88

Editor's Notes

  1. 07/16/96