: How do you set the width of the browser using Google Chrome In IE you can set the browser width to be 1024x768, for example, to test your site. How can you do this in Chrome? I can't find
In IE you can set the browser width to be 1024x768, for example, to test your site. How can you do this in Chrome? I can't find an equivalent setting anywhere? I'm using 'Tools -> Developer tools'.
I can't do the fallback trick of running
javascript:window.resizeTo(1024,768)
in the location bar, because Chrome tries to search for it!
More posts by @Miguel251
1 Comments
Sorted by latest first Latest Oldest Best
You must type (not copy-paste) the entire Javascript (including "javascript:") into the address bar to execute Javascript - Chrome will strip the "javascript:" protocol specification and treat your Javascript as a search if your last action in the address bar is copy-pasting.
A more convenient way to execute arbitrary Javascript in Chrome would be to open the Javascript Console (Ctrl+Shift+J), however, the resizeTo() function is not supported for tabs so you'll need to enter something creative in the console to make this work:
var myTestWindow = window.open(window.location); myTestWindow.resizeTo(1024,768);
(subsequent changes to the pop-up window's size can be made by calling myTestWindow.resizeTo(x,y))
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.