div text-align: left; : div text « Tags « HTML / CSS






div text-align: left;

     
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
    <head>
        <title>margin</title>
<style type='text/css'>
body {
    margin: 10px;
    padding: 0;
}
div div {
    width: 50px;
    height: 50px;
    background: rgb(218, 220, 243);
    border: 1px solid rgb(154, 157, 203);
    text-align: left;
}
div#left {
    text-align: left;
}
div#center {
    text-align: center;
}
div#right {
    text-align: right;
}
</style>


    </head>
    <body>
        <div id='left'>asdf
            <div>asdf</div>
        </div>
        <div id='center'>asdf
            <div>asdf</div>
        </div>
        <div id='right'>asdf
            <div>asdf</div>
        </div>
    </body>
</html>

   
    
    
    
    
  








Related examples in the same category

1.div text-align: center;
2.div text-align: right;
3.DIV text-align:center;
4.Float text with DIV
5.'align' aligns text or other content within the container