Precedence in CSS (When Order of CSS Matters)

On your average CSS-writin’ day, odds are you won’t even think about precedence in CSS. It doesn’t come up a whole heck of a lot. But it does matter! It comes up any time multiple CSS selectors match and element with the exact same specificity.
Assuming specificity is exactly the same, order does matter.
Styles declared later win.

Within a single stylesheet
Say we have some HTML like this:
<!DOCTYPE html>
<html lang=”en”>
<head>
<meta charset=”UTF-8″>
<title>Document</title>
<link rel=”stylesheet” …
Precedence in CSS (When Order of CSS Matters) is a post from CSS-Tricks

via Reme Le Hane

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s