<!-- Any copyright is dedicated to the Public Domain. http://creativecommons.org/licenses/publicdomain/ --> <!DOCTYPE html> <html> <head> <style> .unit { display:inline-block; width:100px; height:1px; background:blue; } </style> </head> <body style="margin:0; width:300px; line-height:100px;"> <span class="unit"></span><span class="unit" ></span><span class="unit"></span><span style="background:lime"><span class="unit" ></span></span> </body> </html>