Friday, December 30, 2011

CSS class name selector

Class name selector begins with a dot. It's a example:
<html>
<head>
<title>Mobile-Web-App</title>
<style>

.graybackground{
background-color: gray;
}
.marketplace{
background-image: url("marketplace.png");
}
.live{
background-image: url("live.png");
}
.bugzilla{
background-image: url("bugzilla.png");
}
.forums{
background-image: url("forums.png");
}
.planet{
background-image: url("planet.png");
}
.wiki{
background-image: url("wiki.png");
}
.portal{
background-image: url("portal.png");
}

.placeBottomRight{
height:50px;
background-repeat: no-repeat;
background-position: bottom right;
}
</style>
</head>
<body>

<h1>Mobile-Web-App: CSS selector by class name</h1>
<div class="graybackground">graybackground</div>
<div class="marketplace placeBottomRight">marketplace</div>
<div class="live placeBottomRight">live</div>
<div class="bugzilla placeBottomRight">bugzilla</div>
<div class="forums placeBottomRight">forums</div>
<div class="planet placeBottomRight">planet</div>
<div class="wiki placeBottomRight">wiki</div>
<div class="portal placeBottomRight">portal</div>

</body>
</html>

class name selector

No comments:

Post a Comment