3 ms·
> Like, how many lines of code does the most basic vbox/hbox thing requires in web technology? CSS: .vbox, .hbox { display: flex } .vbox { flex-direct
by hnbad 5y ago
> Like, how many lines of code does the most basic vbox/hbox thing requires in web technology?
CSS:
.vbox, .hbox { display: flex }
.vbox { flex-direction: column }
.vbox > *, .hbox > * { flex-grow: 1 }
HTML:
<div class="hbox">
<div class="vbox">
<button>Top left</button>
<button>Bottom left</button>
</div>
<div class="vbox">
<button>Top right</button>
<button>Bottom right</button>
</div>
</div>
Or was that a rhetorical question?