Open nirvparekh opened 4 years ago
I am having following html markup
<button class="flex"> <div class="flex-item"> Click Me </div> </button>
and css applied:
.flex { display: flex; width: 100%; height: 48px; background: black; flex-direction: row } .flex-item { height: 100%; background: grey }
The problem is, parent node is <button> with flex-direction: row, child element does not accept height in percentage. height in percentage only works if parent node is <div>
<button>
flex-direction: row
<div>
Why don't you just write on the contrary?
<div><button/></div>
Is there a reason?
Thanks for sharing
I am having following html markup
and css applied:
The problem is, parent node is
<button>
withflex-direction: row
, child element does not accept height in percentage. height in percentage only works if parent node is<div>