I'm creating a really basic webpage editor where you can create "slides" which then can later be displayed somewhere else.
So in order to do that i've created the following page:
The left side is the preview and the right side is the editor where you can set certain properties of a paragraph. Basically both are
float: left;
height: 100%;
width: 50%;
padding: 2%;
Now i want the preview to always be in the ratio of 16:9 so it gives an accurate preview
This is my current code
<div class="leftItem">
<div class="leftArrow"></div>
<div class="preview">
<!-- Here is the text that gets edited -->
</div>
<div class="rightArrow"></div>
</div>
.leftItem {
height: 95%;
width: 50%;
float: left;
display: flex;
align-items: center;
justify-content: center;
}
.preview {
display: block;
width: 90%;
height: 40vh;
border-style: solid;
border-width: 1px;
-webkit-box-shadow: 2px 2px 5px 1px rgba(0,0,0,0.2);
-moz-box-shadow: 2px 2px 5px 1px rgba(0,0,0,0.2);
box-shadow: 2px 2px 5px 1px rgba(0,0,0,0.2);
}
in the content div now, the percentages wont work, how do i fix that?
– niehoelzz Sep 10 '19 at 10:25