asp.net.ph

Skip Navigation Links

CSS Box Attributes

Abakada ~ Back to Basics   CSS Attributes


Property Valid Values Sample Usage
margin length | percentage | auto {1,4} { margin: 10px 5px 10px 5px }
margin-top length | percentage | auto { margin-top: 5px }
margin-right length | percentage | auto { margin-right: 5px }
margin-bottom length | percentage | auto { margin-bottom: 1em }
margin-left length | percentage | auto { margin-left: 5pt }
padding length | percentage {1,4} { padding: 10px 10px 10px 15px }
padding-top length | percentage { padding-top: 10% }
padding-right length | percentage { padding-right: 15px }
padding-bottom length | percentage { padding-bottom: 1.2em }
padding-left length | percentage { padding-left: 10pt }
border border-width | border-style | border-color { border: thin solid blue }
border-top border-width | border-style | border-color { border-top: medium outset red }
border-right border-width | border-style | border-color { border-right: thick inset maroon }
border-bottom border-width | border-style | border-color { border-bottom: 10px ridge gray }
border-left border-width | border-style | border-color { border-left: 1px groove red }
border-width thin | medium | thick | length {1,4} { border-width: 3px 5px 3px 5px; }
border-top-width thin | medium | thick | length { border-top-width: thin }
border-right-width thin | medium | thick | length { border-right-width: medium }
border-bottom-width thin | medium | thick | length { border-bottom-width: thick }
border-left-width thin | medium | thick | length { border-left-width: 15px }
border-style none | solid | double | groove | ridge | inset | outset { border-style: ridge }
border-top-style none | solid | double | groove | ridge | inset | outset { border-top-style: solid }
border-right-style none | solid | double | groove | ridge | inset | outset { border-right-style: double }
border-bottom-style none | solid | double | groove | ridge | inset | outset { border-bottom-style: groove }
border-left-style none | solid | double | groove | ridge | inset | outset { border-left-style: none }
border-color color {1,4} { border-color: green red white blue }
border-top-color color { border-top-color: navajowhite }
border-right-color color { border-right-color: whitesmoke }
border-bottom-color color { border-bottom-color: black }
border-left-color color { border-left-color: #C0C0C0 }
border-collapse* separate | collapse { border-collapse: separate}
float none | left | right { float: none }
clear none | left | right | both { clear: left }

For Table Elements
table-layout auto | fixed { table-layout: fixed }

For Far Eastern Text Characters
layout-grid-mode none | line | char | both { layout-grid-mode: char }
layout-grid-type loose | strict { layout-grid-type: strict }
layout-grid-line none | auto | length | percentage { layout-grid-line: auto }
layout-grid-char auto | length | percentage { layout-grid-char: 75% }
layout-grid-char-spacing auto | length | percentage { layout-grid-char-spacing: 75% }
layout-grid layout-grid-mode | layout-grid-type | layout-grid-line | layout-grid-char | layout-grid-char-spacing { layout-grid: "char line 12px 12px .5in" }

* Proposed

See Also

Using StyleSheets   W3C Cascading Style Sheet Specification   W3C HTML 4.01 Specification



© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note