HTML div align Attribute


<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>HTML div align Attribute</title>
<style>
html, body { width: 100%; height: 100%; padding: 0; margin: 0; border: none; }
.main { width: 500px; height: 500px; padding: 100px; background: #eee; margin: 0 auto; }
.align-left { width: 100%; height: 100px; margin-bottom: 100px; text-align: left; line-height: 100px; font-family: "Arial Black"; font-size: 30px; color: #333; }
.align-center { width: 100%; height: 100px; margin-bottom: 100px; text-align: center; line-height: 100px; font-family: "Arial Black"; font-size: 30px; }
.align-right { width: 100%; height: 100px; text-align: right; line-height: 100px; font-family: "Arial Black"; font-size: 30px; }
</style>
</head>

<body>
<div class="main">
  <div class="align-left">Text Align Left</div>
  <div class="align-center">Text Align Center</div>
  <div class="align-right">Text Align Right</div>
</div>
</body>
</html>



Share on Google Plus

About alpanadesign

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
    Blogger Comment
    Facebook Comment

0 comments: