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

149
Visualizações
How to force desktop browser to use media queries designed for mobile?

I've seen a bunch of stack overflow questions answered that address the problem of showing a desktop version on mobile, but I'm trying to discover how you could force a browser to render a mobile version of a site on desktop.

But is there some equivalent for desktop versions, so that I can 'trick' the browser into using media queries for a smaller device width? Essentially loading the mobile css onto the desktop version.

In essence I'm trying to add a toggle button that when clicked renders my page as though it were mobile. I'm aware you can achieve this affect with chrome tools, but I want to build in that functionality, and am struggling to figure out how to tell the browser to behave as though the viewport were mobile-sized.

Thank you!

about 4 years ago · Santiago Trujillo
2 Respostas
Responde à pergunta

0

if your CSS media queries doesn't work fine on desktop, you're probably missing

<meta name='viewport' content='width=device-width' />

and if they work fine but you want your website to has same view in both mobile and desktop, then why are you using media queries at all?

remove them and your CSS will work on every size as the same

about 4 years ago · Santiago Trujillo Relatório

0

load the site on your mobile phone, take note of the url. If it has a "/m", for example, "https://www.example.com/m" then include it as such in your desktop browser and the mobile version would be loaded. It works for me.

about 4 years ago · Santiago Trujillo 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