Materializecss is not responsive

Asked

Viewed 255 times

2

A few days ago I made a template in materializecss; today I stopped the phone and realized that it is not getting responsive.

I’ll leave some prints to clarify:

Responsive (only when browser decreases)

Responsivo (somente quando diminui o browser)

Non-responsive (when accessed from a mobile phone even

Não responsivo (quando acessado de um celular mesmo)

Someone would know to shed some light on why this is happening?

  • This may be because the resolution of your phone is too large, so it takes the high resolution css and directs it to the pc. You can solve this by decreasing the range of resolution to which the mobile css properties are assigned. I think I was clear

  • @Tiagop. C The worst is that I simulated all phones in Chrome and gave the same problem. My Galaxy S3 mini that has a screen considered small also looked like this. If you want to take a look: https://megamund-scofield17.c9users.io/index.html

  • Doesn’t look like it went wrong, it looks okay.. What’s the problem?

  • @SCOFIELD, try putting this in the head of your html: <meta name="viewport" content="width=device-width, initial-Scale=1.0" />

  • Ready @Guilhermenascimento ;)

2 answers

3


Place the following code in the head of your HTML:

<meta name="viewport" content="width=device-width, initial-scale=1.0" />
  • This must be it +1

  • That’s right @Tiagop. C I thought it was not necessary to declare the viewport with materialize, I was wrong. Thankful!

  • Happy to help! ;)

0

Utilize media queries to make adjustments in certain resolutions: Ex.:

@media screen and ( max-width: 768px){
    .h2{
        font-size: 3.0em;
    }
}

Browser other questions tagged

You are not signed in. Login or sign up in order to post.