We would like to know how to remove spaces between inline-block elements.
<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
.top-menu-item {<!--from www . jav a 2s.c o m-->
display: block;
float: left;
width: 100px;
margin: 0px;
background: #EEE;
border: solid thin red;
}
</style>
</head>
<body>
<div class="top-menu-item">Item 1</div>
<div class="top-menu-item">Item 2</div>
<div class="top-menu-item">Item 3</div>
<a class="top-menu-item"> Item 4 </a>
</body>
</html>
The code above is rendered as follows: