Text flows out of the boundaries : text align « CSS « HTML / CSS






Text flows out of the boundaries

  

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
                      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en'>
    <head>
        <title>height</title>
<style type='text/css'>
body {
    margin: 0;
    padding: 0;
    font: 12px sans-serif;
}
div#wrapper {
    border: 1px solid white;
    background: gold;
    width: 130px;
}
div#box {
    margin: 5px;
    border: 5px solid khaki;
    background: yellow;
    padding: 5px;
    height: 100px;
}
div#inner {
    background: white;
    text-align: justify;
}
</style>


    </head>
    <body>
        <div id='wrapper'>
            <div id='box'>
                <div id='inner'>
                    Peter Piper picked a peck of pickled peppers.
                    Did Peter Piper pick a peck of pickled peppers?
                    If Peter Piper picked a peck of pickled peppers,
                   where's the peck of pickled peppers Peter Piper picked?
                </div>
            </div>
        </div>
    </body>
</html>

   
    
  








Related examples in the same category

1.The text-align Property
2.'text-align' Example
3.text-align all possible values
4.text-align: justify
5.text-align:right;
6.text-align:left;
7.text align center
8.text-align: left;
9.text-align: center;
10.text-align: right;
11.text-align: justify;
12.text-align:left;right;center;justify;
13.Right align text