# Custom element with proportional size

**URL:** <https://forum.wixstudio.com/t/custom-element-with-proportional-size/72459>\
**Category:** Ask the community\
**Tags:** question, code, wix\
**Created:** [July 29, 2025, 11:42pm UTC](https://forum.wixstudio.com/t/custom-element-with-proportional-size/72459 "2025-07-29T23:42:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sciart](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/sciart/32/95456_2.png) [@Sciart](https://forum.wixstudio.com/u/Sciart)\
**Post date:** [July 29, 2025, 11:42pm UTC](https://forum.wixstudio.com/t/custom-element-with-proportional-size/72459/1 "2025-07-29T23:42:05Z")

</div>

Hello i want to make custom element that will be let’s say blue rectangle (in real it will be webgame) with proportion 16:9 and will automatically adjust to window size. I want it to be on the top of browser and centered vertically. I encoutered problem that manually i can set custom width and height in wix editor, but i don’t want it, and when i wanted to overwrite it by setAttribute for example it didn’t work. How to do it ?
