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

HTML / CSS » Tags » div text 
div text-align: right;
     

<!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(218220243);
    border: 1px solid rgb(154157203);
    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: left;
2.div text-align: center;
3.DIV text-align:center;
4.Float text with DIV
5.'align' aligns text or other content within the container
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.