<!DOCTYPE html> | |
<title>Reference: Select element with background color in flexbox with zero height</title> | |
<link rel="author" title="Mozilla" href="https://mozilla.org"> | |
<style> | |
.container { | |
height: 0px; | |
border: 1px dotted black; | |
} | |
.with-background { | |
width: 100%; | |
background: lime; | |
} | |
</style> | |
<body> | |
<div class="container"> | |
<select class="with-background"><option>Hi</option></select> | |
</div> | |
</body> |