Page 93 - 2633 Trackpad Pro V5.1 Class 7
P. 93

MARGIN-RIGHT: It is used to set the right margin of an element.

                   Syntax:     MARGIN:VALUE;

                   OR
                   MARGIN-TOP:VALUE;

                   OR

                   MARGIN-BOTTOM:VALUE;

                   OR
                   MARGIN-RIGHT:VALUE;

                   OR

                   MARGIN-LEFT:VALUE;
                 Let us create a web page to use margins.

                 <!DOCTYPE HTML>
                 <HTML>
                 <HEAD>
                 <TITLE>CSS Margins</TITLE>

                 </HEAD>
                 <BODY>
                 <H1> CSS Margins</H1>
                 <P STYLE="MARGIN-TOP:200PX;
                     MARGIN-BOTTOM:100PX;
                     MARGIN-RIGHT:200PX;

                     MARGIN-LEFT:120PX;">
                 In  CSS,  margins  define  the  space  around  an  element,  outside  of  its
                 border. Margins create distance between the element and other surrounding
                 elements.  You can use them to control  the layout  and positioning  of
                 elements on a webpage.
                 </P>
                 </BODY>
                 </HTML>





















                                                                                         Styling Elements using CSS  91
   88   89   90   91   92   93   94   95   96   97   98