dialogik
dialogik

Reputation: 9552

How to set a fix min width size for window resizing?

Is there a way to restrict the minimum window width to be resized to a width smaller than x pixels. Can I achive this just using CSS or HTML, e.g. meta tags?

I tried setting

body {
    min-width: 420px;
}

and this sets a min width for my body. But I can still resize the windows width to smaller than this width value.

Upvotes: 0

Views: 6537

Answers (1)

J Prakash
J Prakash

Reputation: 1333

You can not control the size of the browser window. You can use CSS to set min-width and min-height properties to ensure your page layout stays same.

You may want to control the size of the browser window which opens when a viewer accesses your web page.(Using javascript)

<body onload="changeScreenSize(500,300)">

Upvotes: 1

Related Questions