0
Hello I am creating a calendar for a website of my anime and would like to redirect each <div>
to a certain place. In case I made a page like this:
I would like each one to take to a specific page.
(Doubt already clarified..)
body {
margin: 0px;
padding: 0px;
background-image: url(https://i.imgur.com/jSCKYV9.jpg );
background-repeat: no-repeat;
background-attachment: fixed;
}
.dia {
margin: 0px;
width: 100%;
height: 50px;
background-color: black;
opacity: 0.7;
}
.dia h1 {
margin: 0px;
padding: 0px;
text-align: center;
color: white;
font-size: 30px;
font-family: "Comic Sans MS";
}
.buttons {
padding-left: 5px;
padding-top: 10px;
padding-right: 5px;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-align-items: flex-start;
-ms-flex-align: start;
align-items: flex-start;
}
.buttons * {
transition: all .5s ease;
}
<!DOCTYPE html>
<html>
<head>
<title>Calendário 2018 - G1Animes</title>
<meta charset="utf-8">
</head>
<body>
<div class="dia" id="segunda">
<h1>Segunda-Feira</h1>
</div>
<div class="buttons">
</div>
<div class="dia" id="terca">
<h1>Terça-Feira</h1>
</div>
<div class="buttons">
</div>
<div class="dia" id="quarta">
<h1>Quarta-Feira</h1>
</div>
<div class="buttons">
</div>
<div class="dia" id="quinta">
<h1>Quinta-Feira</h1>
</div>
<div class="buttons">
</div>
<div class="dia" id="sexta">
<h1>Sexta-Feira</h1>
</div>
<div class="buttons">
</div>
<div class="dia" id="sabado">
<h1>Sábado</h1>
</div>
<div class="buttons">
</div>
<div class="dia" id="domingo">
<h1>Domingo</h1>
</div>
<div class="buttons">
</div>
</body>
But, it’s not just putting links on
divs
.– LeAndrade
I don’t understand your doubt, it’s not simply adding a link to each item?
– Leandro Angelo
@Leandroangelo I put the href but it’s not working
– Deku2k
Update your question, but this is something very basic... no use putting the
href
in<div>
, you need an element<a>
or redirect via javascript...– Leandro Angelo
Check it out: https://www.w3schools.com/TAGs/tryit.asp?filename=tryhtml_link_test
– LeAndrade
<a href="seu link"><div class="dia" id="sexta"><h1>Sexta-Feira</h1></div></a>
you need to put a link tag wrapped in your div... That’s the question?– hugocsl
@hugocsl kkk was that same thank you :)
– Deku2k
I’m glad you solved it, but read the @dvd response well because it talks about points that will help you a lot in the future. Be sure to study the basics avoid only getting things ready. Good luck there
– hugocsl