Page 100 - Plus_V2.2_C7_Flipbook
P. 100

CSS MARGINS


                  CSS ‘margin’ properties enables to create space around an HTML element, outside any border. It is
                  also possible to use negative values to overlap the content. The various margin properties and their
                  values are given in the table.

                              Property                                        Value

                      margin                    Specifies the top, right, left and bottom margin around an element.


                      margin-top                Specifies the top margin of an element.

                      margin-right              Specifies the right margin of an element.

                      margin-left               Specifies the left margin of an element.


                      margin-bottom             Specifies the bottom margin of an element.


                  Example:  <P STYLE=“MARGIN:VALUE;”>TEXT</P>

                              [OR]
                              <P STYLE=“MARGIN-TOP:Value; MARGIN-BOTTOM:VALUE;

                              MARGIN-RIGHT:VALUE; MARGIN-LEFT:VALUE;”>
                              TEXT
                              </P>
                  Let us create a web page to use margins.


                    <!DOCTYPE HTML>
                    <HTML>
                    <HEAD>

                    ILLUSTRATION OF MARGIN
                    </HEAD>
                    <BODY>
                    <P STYLE="MARGIN-TOP:200PX; MARGIN-BOTTOM:100PX; MARGIN-RIGHT:200PX;
                        MARGIN-LEFT:120PX;">
                    With the introduction  of computers,  the business  world  was changed
                    forever.  Using  computers  and  software,  businesses  use  information
                    technology  to ensure  that their  departments  run smoothly.  They use
                    information technology in a number of different departments including
                    human resources, finance, manufacturing, and security.
                    </P>

                    </BODY>
                    </HTML>


                  98    Premium Edition-VII
   95   96   97   98   99   100   101   102   103   104   105