I have a responsive page with two sections. All elements in right section should be responsive so I used :
#rightSection * {max-width:100%;height:auto}
however any further height styles are being ignored as you see in the code snippet.
I don't want to use !important
because I have many inline styles with html codes so I prefer not forcing the styles through CSS. Is there any other way to set heights after height:auto
?
#rightSection * {max-width:100%;height:auto}
.mydiv {
width:534px;
height:37px;
box-sizing:border-box;
}
<div id="rightSection">
<div class="mydiv" style="background:#ff0000"></div>
</div>
That Red div is invisible because the height is igonred!