Dmitry
Dmitry

Reputation: 563

Mobile site — scale it to full width

There is a site with fixed width 1280px.

How can I tell a smartphone to scale this site to full width? At least initially, after page loading.

For now I use:

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

But it doesn't seem to work. Is there any 100% working solution?

Upvotes: 1

Views: 108

Answers (4)

LGjoraas
LGjoraas

Reputation: 11

I was having issues with this as well (even with the meta tag and checking all widths) and I could not figure out how to resolve it until I started using a css reset. Have you tried this? This is the one I am using to reset the browser's CSS prior to implementing your own code. http://html5doctor.com/html-5-reset-stylesheet/

Upvotes: 0

Dmitriy
Dmitriy

Reputation: 4503

If you have a site with a fixed width, then it should help

<meta name="viewport" content='width=1280' />

Upvotes: 1

sia
sia

Reputation: 613

<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">

Upvotes: 0

chaintng
chaintng

Reputation: 1343

initial-scale=1 indicate that it will show the actual size of the webpage. Just cut this parameter out.

Upvotes: 2

Related Questions