CSS Align Text | Coding Tag
×

CSS Align

3802

CSS Align: The CSS (Cascading Style Sheet) property describes how inline content like text is aligned in its parent block element.

Example:

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<style type="text/css">
.center{
margin: auto;
width: 50%;
border: 1px solid #ddd;
padding: 25px;
}
.position {
position: absolute;
left:0px;
width: 20%;
border: 1px solid #eee;
padding: 25px;
}
</style>
</head>
<body>

<h2> CSS Align </h2>
<h3> Center Align </h3>

<div class="center">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc sagittis, justo eu maximus tempor, ante ex scelerisque sem, vel auctor velit justo et nisl. Donec laoreet condimentum lorem nec facilisis. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc sagittis, justo eu maximus tempor, ante ex scelerisque sem, vel auctor velit justo et nisl.
</div>
<h3> Center align </h3>
<div class="position">

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc sagittis, justo eu maximus tempor, ante ex scelerisque sem, vel auctor velit justo et nisl. Donec laoreet condimentum lorem nec facilisis. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc sagittis, justo eu maximus tempor, ante ex scelerisque sem, vel auctor velit justo et nisl.

</div>
</body>
</html>



Best WordPress Hosting


Share:


Discount Coupons

Get a .COM for just $6.98

Secure Domain for a Mini Price



Leave a Reply


Comments
    Waiting for your comments