#100745
Hristofor
Member

Hi Tünde Keller,
You can append a container with position: relative; and place your desired HTML elements inside it and position them anywhere you want. For example:


cosnt window = document.querySelector('smart-window');
window.innerHTML = '<div id="myContainer"><div id="someElement">Your content goes here</div></div>';

CSS:


#myContainer {
width: 100%;
height:100%;
position: relative;
}
#myContainer someElement {
position: absolute;
top: 50%;
left: 50%;
}

Best Regards,
Christopher
Smart HTML Elements Team
https://www.htmlelements.com