Saher Elgendy
Saher Elgendy

Reputation: 1619

How to make the responsive file override the original css file totally in specified breakpoints?

I just found out that specifying a separate css file for responsive design can make some trouble as some rules in the responsive file can not override the original ones sometimes at the specified breakpoints.

I tried some workarounds like using !important in stubborn rules and this solved my problem, but i know that using !important is known as a very bad practice!

Is there another way that is considered a better practice still keeps my file separate???

Upvotes: 1

Views: 68

Answers (1)

Imon
Imon

Reputation: 659

Your resposive css file need to link after style.css

<link rel="stylesheet" type="text/css" href="style.css">
<link rel="stylesheet" type="text/css" href="responsive.css">

Upvotes: 3

Related Questions