I want the children of the div fill its width.
div
now am using a code like this:
You can achieve this using flexbox properties.
Here is a demo:
.parent { display: flex; height: 120px; background: #000; padding: 10px; box-sizing: border-box; } .child { height: 100px; background: #ffffd; flex: 1; margin: 0 10px; }