Professional Documents
Culture Documents
CSS Tutorial: Agenda
CSS Tutorial: Agenda
AGENDA
Introduction
Syntax
How to use style specifications.
Styles
Miftahul Huda
Speech Signal Processing Research Group
Digital Signal Processing Laboratory
EEPIS
Introduction
Applying multiple sheets to a single document
Introduction
<HTML>
<HEAD>
<TITLE></TITLE>
<META name="description" content="">
<META name="keywords" content="">
<META name="generator"
content="CuteHTML">
</head>
<body>
<h1 >WARNING</h1>
<p >Don't go there!</p>
</body>
</html>
Introduction
<HTML>
<HEAD>
<TITLE></TITLE>
<META name="description" content="">
<META name="keywords" content="">
<META name="generator"
content="CuteHTML">
<style type="text/css">
.warning {color:#ff0000}
h1.warning {text-decoration:underline}
p.warning {font-weight:bold}
</style>
</head>
<body>
<h1 class="warning">WARNING</h1>
<p class="warning">Don't go there!</p>
</body>
</html>
Syntax
selector {property: value}
Examples:
body {color: black}
p {font-family: "sans serif"}
p {text-align:center;color:red}
<head>
<link rel="stylesheet" type="text/css"
href="mystyle.css">
</head>
...
Follow a demonstration
Margin
Border
Padding
content
<style type="text/css">
.roundcont {
width: 250px;
background-color: #f90;
color: #fff;
}
.roundcont p {
margin: 0 10px;
}
.roundtop {
background: url(tr.gif) no-repeat top right;
}
.roundbottom {
background: url(br.gif) no-repeat top right;
}
img.corner {
width: 15px;
height: 15px;
border: none;
display: block !important;
}
</style>
<body>
<div class="roundcont">
<div class="roundtop">
<img src="tl.gif" alt=""
width="15" height="15"
class="corner"
style="display: none" />
</div>
<p> Teks isi
</p>
<div class="roundbottom">
<img src="bl.gif" alt=""
width="15" height="15"
class="corner"
style="display: none" />
</div>
</div>
</body>