While inspecting the code in Chrome Developer Tools, I noticed that when I tried to replicate it on my website, it didn't function the same way.
I realized that setting margin: 0; eliminated the margins, but shouldn't the margins technically be negative to remove all space?
I couldn't find in the CSS how the margins were completely removed.
Any suggestions?
Here is my CSS:
.header{
width: 100%;
height: 30px;
background-color: #CCC;
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
border-top: 1px solid black;
border-bottom: 1px solid black;
margin: 0px;
}
This is my HTML:
<div class = "header">
<strong>Categories:</strong>
<?php foreach($categories as $category): ?>
<a href = ".?category_id=<?php echo $category['categoryID'];?>"><?php echo $category['categoryName'];?></a>
<?php endforeach; ?>
</div>