loloof64
loloof64

Reputation: 5392

html css link import order and overriding

I have to define four css imports in a file :

<link rel="stylesheet" media="not screen and (device-width: 1200px) and (device-height: 900px)"
  href="lib/sugar-web/graphics/css/sugar-96dpi.css">
<link rel="stylesheet" media="screen and (device-width: 1200px) and (device-height: 900px)"
  href="lib/sugar-web/graphics/css/sugar-200dpi.css">
<link rel="stylesheet" media="screen"
  href="lib/sugar-web/graphics/css/sugar-200dpi.css">
<link rel="stylesheet" href="css/activity.css">

I want, the simple screen media css (third line : without any condition) to be imported only if the above screen media definitions fail. Is the order of tags correct ?

(What I want to avoid, is that third screen css is loaded in any case).

Upvotes: 0

Views: 167

Answers (1)

Alex Tape
Alex Tape

Reputation: 2291

tried to search your issue?

what you exactly mean with 'without any conditions' ? if none of the media querys is firing none if the linked css files will be imported. for that your order is the right one.

is this the answer?!

Upvotes: 1

Related Questions