What you see is the "user agent style" - the template rules that are introduced by your browser in order to have some correspondence between web pages. You can just override this.
Style sheets from different sources have different priorities as follows (from lowest to highest) *:
- user agent styles => these are the styles that you see in the screenshot
- custom styles
- Author CSS styles (beware of priorities)
- authorβs built-in styles
- Author styles with
!important - custom styles with
!important
user agent = browser
author = you
user = browser user
So for you, all you need to do is declare
ul { padding:0 }
and this will overwrite UA styles. However, if the user would declare their own styles using !important , you cannot do anything about it as an author - (fortunately for the user) you cannot undo these styles.
* In real life, cascading nature is even more complex than this list may suggest, which I did not cover for simplicity. If you're interested in this, look at CSS priority.
Christoph
source share