Saturday, August 17, 2013

CSS align center compatibility

<html>
<head>
<style type="text/css">
.container
{
text-align:center;
}
.center
{
margin-left:auto;
margin-right:auto;
width:70%;
background-color:#b0e0e6;
text-align:left;
}
</style>
</head>

<body>
<div class="container">
<div class="center">
<p>Rice is normally grown as an annual plant, although in tropical areas it can survive as a perennial and can produce a ratoon crop for up to 20 years.</p>
<p>The rice plant can grow to 1–1.8 m tall, occasionally more depending on the variety and soil fertility.</p>
</div>
</div>
</body>
</html>

Result

No comments: