This paragraph is floated left : p layout « Tags « HTML / CSS

HTML / CSS » Tags » p layout 
This paragraph is floated left
     
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
   <html>
        <head>
            <title></title>
            <style type='text/css'>
                div {
                    margin: 10px;
                    background: rgb(200200200);
                    height: 100px;
                }
                
                p#floated {
                    background: rgb(220220220);
                    margin: 10px;
                    padding: 10px;
                    border: 1px solid black;
                    float: left;
                }
                p#normal {
                    background: rgb(240240240);
                    border: 1px solid black;
                }
            </style>
        </head>
            <body>
                <div>
                    <p id='floated'>
                        This paragraph is floated left.
                    </p>
                    <p id='normal'>
                        The text if this paragraph is beside the floated paragraph.
                    </p>
                </div>
            </body>
    </html>

   
    
    
    
  
Related examples in the same category
1.Set width for a paragraph
2.p min-width: 500px;
3.p width:40em;
4.p width: 245px;
5.Set width and height for paragraph
6.p line-height: 1em;
7.Set line height of a Paragraph in content section
8.p max-height: 50px;
9.p line-height: 3em;
10.p height: 245px;
11.p line-height: 2.0;
12.Paragraph with different line-height
13.p float:left;
14.p float:right;
15.p float: left;
16.P display: block;
17.p display:none;
18.p overflow: visible;
19.p overflow: auto;
20.p overflow: scroll;
21.p overflow: hidden;
22.p white-space: nowrap;
23.p white-space: pre;
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.