D
D
Dauren S2016-01-05 13:07:06
css
Dauren S, 2016-01-05 13:07:06

If there is a media query, use it otherwise take the default value?

The situation is this:
If you set some property in template.css, and set media queries for small screens and mobile phones, then it will take the value from template.css anyway and ignore what is in media queries, how to make it look in media queries first, and then in template.css

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Denis Ineshin, 2016-01-05
@IonDen

It makes sense to do the opposite. Default value in normal code, and all modifications in media queries.
And it is best to make mobile phones by default. The method is called mobile first and allows you to design your site from smallest to largest and avoid loading images that are too large for mobile devices.

D
Dauren S, 2016-01-05
@dauren101

I did everything, you can do this in template.css, set the property with default values, and rewrite it with !important in media queries and it will cross out what is in temlate.css

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question