For inline-block correctly use min-width

With inline-block elements set the width to max(min width,
specified width) instead of only using the specified width.
This commit is contained in:
Bryan Bell 2015-03-02 20:39:04 -08:00
parent 2f3697f5f3
commit a35ffe1c6e
4 changed files with 59 additions and 5 deletions

View file

@ -0,0 +1,26 @@
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
* {
margin: 0;
padding: 0;
}
div {
display: inline-block;
min-width: 200px;
width: 100px;
height: 100px;
}
.red {
background-color: red;
}
.green {
background-color: green;
}
</style>
</head>
<body>
<div class="red"></div><div class="green"></div>
</body>
</html>