Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

174
Visualizações
Media query CSS overriding CSS without satisfying the width condition

I have this css:

.realiser-devis { text-transform: uppercase; font-size: 23px; font-weight: 700; margin: 0; color: #fff; }

and i want to reduce the font size if the screen width is less than 1600 px

@media only screen and  (max-width:1600px) {
        .realiser-devis {
            font-size: 12px;
        }
        
    }​

the problem is that the css inside the media query is working without satisfying the condition; the width of my screen is 1800px and the font size is 12 px

is there somthing i'm missing ?

Regards

Amir

about 4 years ago · Juan Pablo Isaza
3 Respostas
Responde à pergunta

0

You may be missing the responsive meta tag in the <head> section.

Make sure you have this in the <head> section:

<meta name="viewport" content="width=device-width, initial-scale=1">

Read more about that here.

about 4 years ago · Juan Pablo Isaza Relatório

0

Please check width of screen using this command in your console while inspecting

console.log(window.screen.width)

if it's still 1800 please reduce your media query max-width to 500 and check, if it works then you should check what issue with screen width you have.

Otherwise please try using media queries without key word only(it can affect older browsers):

@media screen and  (max-width:1600px) {
    .realiser-devis {
        font-size: 12px;
    }
}​
about 4 years ago · Juan Pablo Isaza Relatório

0

<meta name="viewport" content="width=device-width, initial-scale=1">

useful information : https://developer.mozilla.org/en-US/docs/Web/HTML/Viewport_meta_tag

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda