Page 90 - Modular_V1.1_Flipbook
P. 90

CSS HEIGHT AND WIDTH

                  The height and width properties enables to set the height and width of an element. It is also used
                  to set the height and width of the area inside the border, margin, etc. of the element.

                  The height and width can be specified in length whose values can be in ‘px’, ‘cm’, etc. or in
                  percent (%) of the containing block.
                  Syntax:       <P STYLE=“HEIGHT:Value; WIDTH:Value”>

                                TEXT
                                </P>
                  Let us create a web page to change the height and width of a box.
                  <HTML>
                  <HEAD>
                  </HEAD>
                  <BODY>
                  <P STYLE="HEIGHT: 100PX;WIDTH: 200PX;BACKGROUND-COLOR: PINK;">
                  THIS ELEMENT HAS A HEIGHT OF 100PX AND A WIDTH OF 200PX:</P>
                  </STYLE>
                  </BODY>
                  </HTML>






















                                                        Changing height and width

                      CSS OUTLINE

                  An outline is a line that is drawn around elements, to make the element “stand out”. Outline
                  differs from borders as it is drawn outside the element’s border, and may overlap other content.
                  CSS has the following outline properties:

                       ‘outline-width’ property is used to set the width of the outline.
                       ‘outline-style’ property is used to set the style of line for the outline and can have values like
                       Dotted, Dashed, Solid, Double, Groove, Ridge, Inset, Outset, None, Hidden, etc.
                       ‘outline-color’ property is used to set the color of the outline.

                       ‘outline-offset’ property is used to add space between an outline and the edge/border of an
                       element. The space between an element and its outline is transparent.

                  88      Touchpad MODULAR (Version 1.1)-IX
   85   86   87   88   89   90   91   92   93   94   95