Convert html elements with fixed dimension in percentage

0

If for example I have these 2 elements DIV with width and height fixed

<div style="background-color:red; width:1440px; height:400px"></div>
<div style="background-color:blue; width:1440px; height:400px"></div>

And I put them inside a DIV with percentage dimensions, like this:

<div style="border-style: solid;border-color:green; width:97vw; height:50vh">
    <div style="background-color:red; width:1440px; height:400px"></div>
    <div style="background-color:blue; width:1440px; height:400px"></div>
</div>

The 2 DIV's of inside should not be adapted to width and height of% main% co?

What I want to achieve basically is an adaptable effect to multiple screens without having to touch the dimensions of the main elements, only putting them in DIV with percentage dimensions.

    
asked by Oren Diaz 08.07.2018 в 19:44
source

0 answers