JavaScript UI Libraries & Blazor Components Suite – Smart UI › Forums › Window › Set Width and Height window
Tagged: window size
<div> <div>i want set widht and height from code, not from css, but this not work</div> <div> const wnd = document.createElement(‘smart-window’);</div> <div></div> <div> wnd.opened = true;</div> <div></div> <div> wnd.style.width = 400; wnd.style.height = 250; //doesnot work</div> <div> <div> wnd.width = 400; wnd.height = 250; //also doesnot work</div> <div></div> </div> </div>
Hi,
The provided code is invalid. To apply CSS you should use wnd.style.width = ‘400px’;
Best regards, Peter Stoev
Smart UI Team https://www.htmlelements.com/