53
Views
3
Comments
Min resize screen in chrome

Hi,

I need resize screen down to 1280px. After that, this chrome can not resize down. Do you have any solution. Please help me.

2024-01-04 15-15-51
Abed Al Banna

Hi @Minh Quang Nguyen 

Could you elaborate further what the issue you're tackling is?

2023-07-12 04-21-28
Ivan Maulana

I think there is no way to permanently lock or fix the size of a browser window. The ability to resize the browser window is the user's prerogative, and modern browsers often restrict the coding capabilities to control the window size for security and user convenience. 

maybe you can explore with javacript code.


Thanks.

2024-01-04 15-15-51
Abed Al Banna

I agree with @Ivan Maulana, the ability to change the screen size programmatically is not possible, not even JavaScript provides the capability to restrict or modify the functionality of the browser itself. JavaScript only operates within the constraints and permissions defined by the browser environment (Chrome, in this case).

The only thing you can do in this case is make the layout responsive and adaptable to different screen sizes. 

Get the dimensions of the screen, and based on that, style your layout and show/hide elements:

var width = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;

var height = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;
 

I hope this helps!


Best regards,

Abed

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.