CSC 3750 Lecture Notes - Lecture 11: Xhtml, Serif, Times New Roman
Document Summary
Configures a border on the top, right, bottom, and left sides of an element. Border-color h2 { border: 2px solid #ff0000 } Block display element default width of element content extends to browser margin (or specified width) Inline display element: border closely outlines the element content h2 { border: 2px solid #ff0000; } a { border: 2px solid #ff0000; } Use css to configure a line on one or more sides of an element. Border-top h2 { border-bottom: 2px solid #ff0000 } Configures empty space between the content of the html element and the border. Set to 0px by default h2 { border: 2px solid #ff0000; padding: 5px; } Use css to configure padding on one or more sides of an element. Padding-top h2 { border: 2px solid #ff0000; background-color: #cccccc; padding-left: 5px; padding-bottom: 10px; padding-top: 10px; } First value configures top and bottom padding.