I'm having a small issue with my code . I'm trying to code after a long time and forgot a few basics. I'm trying to create a simple html layout .
As you will also see in the pictures , i'm getting another issue where the page is slightly longer than i expected and its showing the slider to move up and down . I didn't want this unless the page content is longer than expected (wrap) .
The top will remain fixed all the time . the footer will move based on the length of the content or stay fixed at the bottom if the content(wrap) is small.
What i'm expecting:

What i'm getting (without top):

with top :

HTML layout :
<!DOCTYPE html>
<html lang="en">
<head>
@include('layouts.includes.head')
<link href="{{ asset('/css/style.css') }}" rel="stylesheet">
</head>
<body>
<div id ="top">
<div>
<div id = "wrap">
</div>
<footer>
</footer>
</body>
</html>
CSS :
html,body
{
height: 100%;
background-color:red;
}
#top {
height: 50px;
height: auto;
margin: 0 auto -50px;
background-color: yellow;
width:auto;
}
#wrap {
min-height: 100%;
height: auto;
margin: 0 auto -50px;
background-color: blue;
width:auto;
}
footer {
height: 50px;
background-color: black;
}
<div id="top>doesn't close and also in the CSS you have for#topbothheight:50px;andheight:auto;. If these issues are also in your code they might cause your problem.