How browser auto resize website to mobile browse?

CJ Ramki picture CJ Ramki · Aug 29, 2013 · Viewed 25.6k times · Source

I created a website without using mobile theme. If i open my website in my smart phone browser, it resizing my theme. I mean, It automatically reduce the size to my mobile browser. For example...I already mention my text box size in my CSS code. The mobile screen pixel size is differ from desktop machine screen pixel size.

My Question is, how it reduce the screen resolution to mobile view? please clear my doubt.

Thanks in advance.

Answer

Sascha picture Sascha · Aug 29, 2013

Do you mean to resize your sites content for the handheld device? If you have a fluid layout (with % instead of pixels for widths) use:

<meta name="viewport" content="width=device-width, initial-scale=1.0">

Further reading: http://developer.android.com/guide/webapps/targeting.html