5 Reasons Why Your CSS Media Queries Are NOT Working (Meta Viewport Tag, Landscape, and More)

preview_player
Показать описание
Why your CSS Media Queries are not working? CSS Media queries are an important part of Responsive web design but sometimes they don't work as we expect or they don't work at all, so in this video, I will show 5 common mistakes that developers make while using media queries and suggest you guys solutions for that.

What are Media Queries?
Media queries are basically a special type of CSS keyword which are being used to adapt the necessary styling rules for any kind of devices like mobile phones, tablets, and many others as well.

SECTIONS:
(00:00) -  INTRO
(00:20) - What are Media Queries?
(00:44)  - #1: Always Add Meta Viewport Tag
(02:44)  -  #2: Don't Use the !important tag & inline styling
(03:42)  -  #3: Add Media Queries at the End
(04:14)  - #4: Use The Right Syntax for Media Queries
(04:35)  - #5: Learn Orientation: Portrait vs Landscape

#css #mediaqueries #responsivedesign #webdevelopment
Рекомендации по теме
Комментарии
Автор

Thanks man, you saved me. I accidently linked the media query css file before the style.css and your 4th point made it clear to always include it at the end. :)

SumitKumar-jepr
Автор

thank you man I wasted my whole day on fixing this stuff. :)

ashutoshv
Автор

I used to write my media queries at the bottom but for the code I am writing now, I wrote it at the top and I was angry about why didn't work. I watch your videos and I understand why it is not working . thanks for the video. it is really helpful

aebek
Автор

Opened this video after scratching my head for 3 days. The first tip was the problem. Thanks!

shannonmerchant
Автор

This video saved many lives, I am one of them, My frustration level was 99 before I found it.

iamtsquare
Автор

Thanks for this. I was in frustration whole day, finally got the solution.

billionairelifestyl.e
Автор

I'm browsing for coding solution and a man with Turkish accent tells me how to solve. Gosh, finally.

bedirhanozcan
Автор

the biggest blunder i did was placing media query somewhere in the center thank you for pointing it out sir

ABHISHEKS-pepw
Автор

Thanks dude, i waste 10 min on this problem and you helped me for 1 min

Собственник-тк
Автор

!important;


worked for me.. Thanks a lot. I was stuck here for half an hour.. Cheers!

muhammadsaad
Автор

After 30 minutes work, i found what is my mistake on your video. Thank you

yasircesmeci
Автор

Thank you so much sir.... i have just wasted 1 and half hour to solve this....

introvert
Автор

I literally was about to breakdown for that simple shit.. thank u man❤❤❤

shivamraul
Автор

Oh my god, I love you man, I was so happy when I found out what mistake i've made haha

luciu
Автор

Thank you so much!!! I spent two days trying to get my media queries to work

iiinicky
Автор

Thank you so much bro i tried for 3 days fixing this stuff, finally found your video 😁🙌🤙😇

harshvarmora
Автор

Thanks bro i just spend my whole day because if this issue😂😂

biswajitmahato
Автор

Thanks bro.
Finally I can move forward
Without any tention in mind about media query.
Thanks

sumitsihag
Автор

I am facing an issue where a specific width mentioned inside the query fails to apply the css and takes the css of the next larger pixel width query. (have added !important as well still facing same issue). Please advice.

aiz
Автор

Thank you so so much I was using my media query in the middle of my file which is why it was always overwritten by css below it.

pratyushm