Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,190,171 members, 7,939,734 topics. Date: Wednesday, 04 September 2024 at 11:03 AM

I Need Help With This Css Issue - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / I Need Help With This Css Issue (388 Views)

Please Help With This Css. / Free Online Training For Html/css, Javascript, Jquery, Mysql, Php, Java, Android / After 10days Of Coding With Html, Css And Javascript Forum4africa Is Ready (2) (3) (4)

(1) (Reply) (Go Down)

I Need Help With This Css Issue by Davidcorny: 4:41pm On Feb 02, 2023
Hey guys, I was building a project from frontend mentor and this required using a media query for the desktop layout(built it mobile-first), the problem i have is that it has refused to change or respond to a media query of:

@media (min-width: 50em) {}

I mean literally nothing changed, the only clue i have from trying to debug this is that the media query responded a bit when i changed the main css with(article.card-body) to have a property of min-width.

This is an example of the code https://codepen.io/david4bay/pen/MWBzdyQ

I am using SASS(scss syntax).

I've tried stackoverflow but all i got was insults and no answers.
Re: I Need Help With This Css Issue by Nobody: 4:49pm On Feb 02, 2023
Davidcorny:
Hey guys, I was building a project from frontend mentor and this required using a media query for the desktop layout(built it mobile-first), the problem i have is that it has refused to change or respond to a media query of:

@media (min-width: 50em) {}

I mean literially nothing changed, the only clue i have from trying to debug this is that the media query responded a bit when i changed the main css with(article.card-body) to have a property of min-width.

This is an example of the code https://codepen.io/david4bay/pen/MWBzdyQ

I am using SASS(scss syntax).

I've tried stackoverflow but all i got was insults and no answers.

Who insulted u in Stackoverflow?

U can try

@media screen and (min-width: 50em) {

.hide{
display:none;
}

1 Like

Re: I Need Help With This Css Issue by Davidcorny: 4:53pm On Feb 02, 2023
GREATIGBOMAN:


Who insulted u in Stackoverflow?


It really doesn't matter, I'll prefer to have answers even if I'm insulted so I understand than no answers at all.

1 Like

Re: I Need Help With This Css Issue by Nobody: 4:54pm On Feb 02, 2023
Davidcorny:


It really doesn't matter, I'll prefer to have answers even if I'm insulted so I understand than no answers at all.

Check the previous post

Also it's better u post screenshots of your code.
Re: I Need Help With This Css Issue by Davidcorny: 5:08pm On Feb 02, 2023
GREATIGBOMAN:


Check the previous post

Also it's better u post screenshots of your code.

The CSS is too long to wrap in my snipping tool but here's the html, you can see I'm using a picture element to substitute images with a width above 800px, this however does not work. I may just cancel everything and use a background-image property instead, then hide the mobile image if I can't find a solution.

Re: I Need Help With This Css Issue by Nobody: 5:10pm On Feb 02, 2023
Davidcorny:


The CSS is too long to wrap in my snipping tool but here's the html, you can see I'm using a picture element to substitute images with a width above 800px, this however does not work. I may just cancel everything and use a background-image property instead, then hide the mobile image if I can't find a solution.
Re: I Need Help With This Css Issue by Nobody: 5:30pm On Feb 02, 2023
Davidcorny:


The CSS is too long to wrap in my snipping tool but here's the html, you can see I'm using a picture element to substitute images with a width above 800px, this however does not work. I may just cancel everything and use a background-image property instead, then hide the mobile image if I can't find a solution.

what element are u trying to hide in this image and what screen size are u trying to hide it
Re: I Need Help With This Css Issue by Davidcorny: 5:44pm On Feb 02, 2023
GREATIGBOMAN:


what element are u trying to hide in this image and what screen size are u trying to hide it

I'm trying to switch the image nested in the picture tag between desktop and mobile as the screen increases above 800px or 50em.
Re: I Need Help With This Css Issue by Davidcorny: 8:57pm On Feb 02, 2023
Fixed : Nested SCSS creates a high specificity that invalidates media queries.

(1) (Reply)

GPT-4 To Revolutionize Video Generation , It Is Multimodal / Finding High-paying Freelance Jobs In 2023: Tips And Strategies / The Unabomber Is Gone

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 29
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.