Tuesday, December 27, 2011

CSS: set width using %

CSS: set width using %
<html>
<head>
<title>CSS Test</title>
<style>
body {
width: 75%;
background-image: url("http://goo.gl/ZTEx7");
background-repeat: no-repeat;
background-position: bottom right;
background-color: #e0e0e0 }
h1{font: bold 2em helvetica}
p {
font-size: 20px;
color: white;
width: 50%;
background-color: #303030 }
</style>
</head>
<body>

<h1>Mobile-Web-App: set width using %</h1>
<p>width of <body> = 75%</p>
<p>width of <p> = 50% inside <body></p>

</body>
</html>


No comments:

Post a Comment