Reputation: 48453
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
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