Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 51 - 2625 PortGPt V2.1
P. 51

    CSS MARGINS

                     CSS ‘margin’ properties enable to create space around an HTML element, outside any border. It
                     is also possible to use negative values to overlap the content. Properties to set margin around an

                     element are:

                       margin: It specifies the top, right, left and bottom margin around an element.
                       margin-bottom: It is used to set the bottom margin of an element.

                       margin-top: It is used to set the top margin of an element.
                       margin-left: It is used to set the left margin of an element.

                       margin-right: It is used to set the right margin of an element.
                     Syntax to use the 'margin' property is as follows:

                         <P STYLE=“MARGIN-TOP:Value; MARGIN-BOTTOM:Value; MARGIN-
                     RIGHT:Value; MARGIN-LEFT:Value;”>
                         TEXT
                         </P>

                                                                                                  Introduction to CSS3  49

| 46 47 48 49 50 51 52 53 54 55 56 |