Tagged: 

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #103062
    Joko Pitoyo
    Participant

    <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>

    #103067
    admin
    Keymaster

    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/

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.