<html> <head> <style> div.wrapper { width: 101px; height: 30px; } div.a, div.b { height: 20px; display: inline-block; } div.a { width: 20px; background: blue; } div.b { width: 80px; background: green; } </style> </head> <body> <div class="wrapper"> <div class="a"></div> <div class="b"></div> </div> </body> </html>