sam
sam

Reputation: 10094

Internal style sheet being over riden by external css declared earlier in html doc

Im playing around with the front end of a site using the new bootstrap 3.0 and im fine tuning things by irritating in firebug, but there is something odd that i keep noticing

even though my <head> is layed out like this

<link rel="stylesheet" href="bootstrap.css">

<style>
 td {padding:0px;}
<style>

With the external css being declared before the internal (which im only using during development) the external styles are still over riding them.

To get the padding:0px; to work i need to set it as padding:0px !important;

Any ideas why this is.. i thought that the last declared peice of css would always override conflicting previously declared css.

Upvotes: 0

Views: 236

Answers (1)

dfockler
dfockler

Reputation: 166

CSS precedence is about !important, origin (user vs browser), specificity and then order. Here is a good explanation.

Upvotes: 1

Related Questions