So I have a friend who is learning web development and he coded this. There is a gap in between the 2
<div>
elements which he doesn't want there. The only way I can think of removing that gap is by adding margin-top: -19px;
to the div with the info
id, but that doesn't really seem like the best way to do it. Is there any better way to do it?
HTML:
<html>
<head>
<title> Document</title>
<style>
.menu-items{
padding: 12px 16px;
text-decoration-color: black;
font-size: 22px;
}
.list{
font-size: 18px
}
.image{
width:400px;
height:300px;
}
.section{
width:100%;
height: 665px
top:0px ;
}
#info{
background-color: lightblue;
top:0px;
height: 100%;
}
</style>
</head>
<body style="margin: 0px">
<div style="background-color:rgb(111, 153, 179); padding: 24px;">
<span class="menu-items"><b> Index </b></span>
<span class="menu-items"><b> Food </b></span>
<span class="menu-items"><b> About</b></span>
</div>
<div id="info" class="section">
<h3 style="padding-left:16px;"><b> Top 5 Favorite Foods:</b></h3>
<ol style="list-style-type:disc">
<li class="list"><a href="/14. Doucment.html"> Biryani </a></li>
<li class="list"> Pizza </li>
<li class="list"> Lasagna </li>
<li class="list"> Burger </li>
<li class="list"> Caesad Salad </li>
</ol>
<p style="text-align:center">
<img src="https://latestduniya.com/wp-content/uploads/2019/01/PicsArt_01-21-02.08.09-696x522.jpg"
class="image" alt="Biryani">
</p>
</div>
</body>
</html>