Switch to full style
HTML code examples
Post a reply

Aligning the text within the div tag

Sat Jan 07, 2012 11:13 am

Aligning the text within the div tag , this example use css to define different alignment of text inside the

Code:
<html>
<
head>
<
title>Align text within the div tag</title>
<
style type='text/css'>
#content
{
  
background:#BC34EF;
  
clear:both;
  
color:#FFFFFF;
  
height:25;
  
line-height:1.8em;
  
padding:2;
   
}

#content a
{
  
background:inherit;
  
color:#FFFFFF;
  
text-decoration:none;
}
#content .leftSided
{
  
margin:0 0 0 20px;

}

#content .rightSided
{
  
  
margin-right:20px;
  
margin-left:10px;
}
</
style>

</
head>
<
body>
 
   <
div id="content">
     <
span class="leftSided">Codemiles team</span>

     <
span class="rightSided">Says hello to you 
     
</span>
     <
a href="#">Visit us</a>
   </
div>


</
body>
</
html>
  




Post a reply
  Related Posts  to : Aligning the text within the div tag
 aligning the scanned images     -  
 Able to Copy Text from Uneditable Text Boxes(JTextfields)     -  
 Java- Copy text area into disabled text area     -  
 Get Text Field value by php     -  
 Flaming Text     -  
 Transparent Text     -  
 text like a curve     -  
 i tag for italic text     -  
 Text Texture in java     -  
 adding padding to your text     -  

Topic Tags

HTML Div