im new with the web dev thing and im trying to make slideshow, now i wanna put another div under the slideshow that has a paragraph but when i try to do it the paragraph goes over the slideshow. this picture will explain my problem better i guess.. what i want is the paragraph stay under the slideshow
HTML :
<nav >
<div >
<div >
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" fill="#FFD60A"
viewBox="0 0 16 16">
<path d="M10.5 8.5a2.5 2.5 0 1 1-5 0 2.5 2.5 0 0 1 5 0z" />
<path
d="M2 4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2h-1.172a2 2 0 0 1-1.414-.586l-.828-.828A2 2 0 0 0 9.172 2H6.828a2 2 0 0 0-1.414.586l-.828.828A2 2 0 0 1 3.172 4H2zm.5 2a.5.5 0 1 1 0-1 .5.5 0 0 1 0 1zm9 2.5a3.5 3.5 0 1 1-7 0 3.5 3.5 0 0 1 7 0z" />
</svg>
<h1 >Zon Photography</h1>
</div>
<div >
<a href="" >HOME</a>
<a href="#PACKAGES">PACKAGES</a>
<a href="">PHOTOS</a>
<a href="">ABOUT</a>
<a href="">CONTACT US</a>
</div>
<button >
<span></span>
<span></span>
<span></span>
</button>
</div>
</nav>
<div >
<div >
<img id="imgslid" src="/Images/1.jpg" style="width:100%">
</div>
<div >
<img id="imgslid" src="/Images/2.jpg" style="width:100%">
</div>
<div >
<img id="imgslid" src="/Images/3.jpg" style="width:100%">
</div>
<div >
<img id="imgslid" src="/Images/4.jpg" style="width:100%">
</div>
<div >
<img id="imgslid" src="/Images/5.jpg" style="width:100%">
</div>
</div>
<div >
<p> My paragraph goes here</p>
</div>
CSS:
*{
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Raleway', sans-serif;
}
.container{
max-width: 1280px;
margin: 0 auto;
display: flex;
align-items: center;
justify-content: space-between;
}
nav{
position: absolute;
top:0;
left: 0;
right: 0;
z-index: 99;
padding: 16px 32px;
}
/* Slide Show Container */
.slider{
position: relative;
background-color: #003566;
}
/* Hide the images by default*/
.myslider{
max-height: 255px;
display: none;
}
/* Fading animation */
.fade {
animation-name: fade;
animation-duration: 0.5s;
}
@keyframes fade {
from {opacity: 0,4}
to {opacity: 1}
}
/* LOGO */
svg{
margin-top: 20px;
}
/* ZON PHOTOGRAPHY */
.name{
display: none;
float: right;
color: #FFC300;
padding: 10px;
transition: 0.4s;
font-size: 35px;
font-family: 'Pacifico', cursive;
}
/* Humberger Container */
.humberger{
display: block;
position: relative;
z-index: 1;
user-select: none;
appearance: none;
border: none;
outline: none;
background: none;
cursor: pointer;
}
/* Humberger Lines */
.humberger span{
display: block;
width: 33px;
height: 4px;
margin-bottom: 5px;
position: relative;
background-color: #FFC300 ;
border-radius: 6px;
z-index: 1;
transform-origin: 0 0;
transition: 0.4s;
}
/* Humberger Transofrmation */
.humberger:hover span:nth-child(2){
transform: translateX(10px);
background-color: #003566;
}
.humberger.is-active span:nth-child(1){
transform: translate(0px, -2px) rotate(45deg);
}
.humberger.is-active span:nth-child(3){
transform: translate(-3px, 3px) rotate(-45deg);
}
.humberger.is-active span:nth-child(2){
opacity: 0;
transform: translateX(15px);
}
.humberger.is-active:hover span{
background-color: #0862b8;
}
/* NAV MENU LIST */
.menu{
display: none;
flex: auto;
justify-content:center;
align-items: center;
margin: 0;
}
.menu a{
color: white;
text-decoration: none;
padding: 15px;
font-weight: bold;
font-size: 18px;
transition: 0.4s;
}
.menu a:hover{
color:#FFC300;
}
/* NAV MENU TRANSFORMATION */
@media (min-width: 768px){
.humberger{
display: none;
}
.menu{
display: flex;
}
.name{
display: flex;
}
#slider ul li img{
width: 100%
}
}
CodePudding user response:
I see you are using position: absolute on nav tag which is creating the issue.
CodePudding user response:
You should change the position to relative. That will probably solve the problem.