How To Override Unwanted CSS Styles

Last reviewed/updated: 05 Aug 2016 | Published: 05 Jul 2015 | Status: Active
Web browser support: Internet Explorer 10+, Edge 12+, Firefox 6+, Chrome 30+, Opera 17+

1. Introduction

One technique for editing existing CSS styles is to edit the CSS source files directly. Another technique for editing existing CSS styles is to leave the CSS source files alone/intact, and to load additional CSS files, after the CSS source files, that override the existing CSS styles. The latter technique requires knowing how to override unwanted CSS styles.


2. How To Override Unwanted CSS Styles

How To Override Unwanted CSS Styles
Unwanted CSS Style Property Override Unwanted CSS Style Property With Value Note
background-color transparent
  • W3C recommended initial value.
border 0
  • No border.
border-color currentColor
  • W3C recommended initial value.
  • currentColor is computed value of color property.
border-radius 0
  • W3C recommended initial value.
border-style none
  • W3C recommended initial value.
  • No border. Sets border-width: 0.
border-width medium
  • W3C recommended initial value.
border-width 0
  • No border.
box-shadow none
  • W3C recommended initial value.
box-sizing content-box
  • W3C recommended initial value.
font-size medium
  • W3C recommended initial value.
font-style normal
  • W3C recommended initial value.
font-weight normal
  • W3C recommended initial value.
line-height normal
  • W3C recommended initial value.
margin 0
  • W3C recommended initial value.
min-height 0
  • W3C recommended initial value.
min-width 0
  • W3C recommended initial value.
outline 0
  • No outline.
outline-color invert
  • W3C recommended initial value.
outline-style none
  • W3C recommended initial value.
  • No outline. Sets outline-width: 0.
outline-width medium
  • W3C recommended initial value.
outline-width 0
  • No outline.
padding 0
  • W3C recommended initial value.
vertical-align baseline
  • W3C recommended initial value.

3. Resources And Additional Information