To remove the space between the inline-block element use margin-right property. This property is used to remove the space between their right positioned element. This property generated negative values to remain close to their adjacent element.
Syntax:
element { margin-right:value; }
<!DOCTYPE html> <html> <head> <style> nav a { display: inline-block; margin-right:-4px; background: #f12e14; color:white; font-weight:bold; text-decoration:none; } h1 { color: #803300; } body { text-align:center; } </style> </head> <body> <h1>Bajarangi Soft</h1> <h2>margin-right:-4px;</h2> <nav> <a href="#"> Bajarangi </a> <a href="#"> for </a> <a href="#"> Web designers</a> </nav> </body> </html>