<!DOCTYPE HTML> <html> <head> <style> span { display:inline-block; width:50px; height:10px; background:yellow; } </style> </head> <body style="width:100px; border:1px solid black;"> <div style="float:left; width:50px; height:50px; background:green;"></div><span></span> </body> </html>