user984621
user984621

Reputation: 48453

Twitter bootstrap and max-width for mobile devices?

I would like to set the fixed with for mobile devices on 320px - I would like to want to look my website always the same as on the screen for 320px.

I have tried to set up the fixed width on 320px, like this:

@media (max-width: 320px) {
    body {
        width: 320px;
    }
}

But this code doesn't work me. Is there any way to do it?

Upvotes: 4

Views: 5054

Answers (1)

Romain Braun
Romain Braun

Reputation: 3684

You could use the meta tag in your html.

<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=320, height=device-height, target-densitydpi=medium-dpi" />

Upvotes: 6

Related Questions