How to Add Width to CSS Borders

CSS is the style sheet definition language that enables you to modify your Web page format and layout. CSS borders can be added to multiple HTML elements, including images, divs and text. You can use CSS attributes to make your border dotted or solid, indicate the color and define the line thickness or width.

Instructions

    • 1

      Open the HTML document using your editing application or text editor. Locate the CSS style definition, for instance:

      #border_style {
      border:#006600 medium solid;
      }

    • 2

      Change the “medium” width value to another keyword such as “thick” or “thin,” or to a pixel value:

      #border_style {
      border:#006600 8px solid;
      }

    • 3

      Change the style values to define the width of the four sides independently, in the order of top, right, bottom and left:

      #border_style {
      border-color:#006600;
      border-style: solid;
      border-width: thin thick thin thick
      }

Related Searches:

References

Resources

Comments

Related Ads

Featured