is not being positioned where I want it to go

I'm trying to create a fake website for a school project. So far I've added a banner of images that cross fade. The next thing I want to add is a bar where you could go to different pages like "food," "sale," and so on. I want this bar to go beneath the image banner. When I add the tags though, they are positioned on top of my banner. Before, I had used a simple image banner, and when I added the tags they positioned themselves beneath the image like normal. But because I'm using multiple images and animations, it's behaving differently and I don't know how to fix it.

enter image description here

Below is the effect that I want (but it's because I disabled the cross fade)

enter image description here

The closest solution I got is changing .fadein{height:1000px} and that moves the buttons down but I'm not sure how viable that is. I've also changed the position of the buttons from relative, absolute, etc. but none give the effect that I want.

Here is my code.

Edit: I don't know why you removed my thanks message but I'm putting it here again because I actually appreciate anyone who comments and I want them to know that. So thank you to anyone who reads and or replies to my post.

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
<style type="text/css">
/* http://meyerweb.com/eric/tools/css/reset/ 
   v2.0 | 20110126
   License: none (public domain)
*/

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 100%;
    font: inherit;
    vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
    display: block;
}
body {
    line-height: 1;
}
ol, ul {
    list-style: none;
}
blockquote, q {
    quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
    content: '';
    content: none;
}

img {display:block}
    
.button {
    background-color:black;
    border: none;
    color: white;
    padding: 15px 32px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 20px;
    font-family: Segoe, "Segoe UI", "DejaVu Sans", "Trebuchet MS", Verdana, sans-serif;
}
.button:hover{background-color:aqua}

.header {
    background-color: #DB912B;
}
p {
    font-family: Segoe, "Segoe UI", "DejaVu Sans", "Trebuchet MS", Verdana, sans-serif;
}

.blackFriday{
    line-height: 40px;
    height: 40px;
    position: relative;
    overflow: hidden;
    background-color: antiquewhite z-index: 1;
    font-family: Segoe, "Segoe UI", "DejaVu Sans", "Trebuchet MS", Verdana, sans-serif;
}

/*.fadein{height:100px;}*/
    
/*Animated Banner*/
.fadein img {
    position:absolute;
    -webkit-animation-name: fade;
    -webkit-animation-iteration-count: infinite;
    -webkit-animation-duration: 12s;
    animation-name: fade;
    animation-iteration-count: infinite;
    animation-duration: 12s;
}

@-webkit-keyframes fade {
    0% {opacity: 0;}
    20% {opacity: 1;}
    33% {opacity: 1;}
    53% {opacity: 0;}
    100% {opacity: 0;}
}
@keyframes fade {
    0% {opacity: 0;}
    20% {opacity: 1;}
    33% {opacity: 1;}
    53% {opacity: 0;}
    100% {opacity: 0;}
}

#f1 {
    background-color: lightblue;
}
#f2 {
    -webkit-animation-delay: -8s;
    background-color: yellow;
}
#f3 {
    -webkit-animation-delay: -4s;
    background-color: lightgreen;
}
    
    
</style>

</head>

<body>
    <center>
      <p class="blackFriday" style="background-color:#191616; color: white; font-weight:bold;">BLACK FRIDAY SALE!</p>
    </center>
<div class="fadein">
    <img id="f3" src="banner1.png" width="100%" alt="">
    <img id="f2" src="banner2.png" width="100%"  alt="">
    <img id="f1" src="banner3.png" width="100%"   alt="">
</div>

<!--Buttons-->
<center>
    <p style="background-color:black; position:relative;" >
        <button class="button">food</button>
        <button class="button">toys</button>
        <button class="button">medicine</button>
        <button class="button">holiday sale</button>
        <button class="button">about us</button>
    </p>
</center>
    
</body>
</html>



Comments

Popular posts from this blog

Today Walkin 14th-Sept

Spring Elasticsearch Operations

Hibernate Search - Elasticsearch with JSON manipulation