At first, I am aware that there are numerous questions similar to this one, but none of the resources I have come across have provided a solution. For some reason, my current approach is not working...
I am trying to create a clickable area inside the class="downloadBoks"
, instead of just making the text within <a></a>
clickable. I want to achieve this without using JavaScript.
Here is the HTML code:
<div class="sideboks">
<div class="downloadBoks">
<a href="Prosjektplan.pdf">Prosjektbeskrivelse</a>
</div>
<div class="downloadBoks">
<a href="Statusrapport.pdf">Statusrapport</a>
</div>
</div>
And here is the CSS code:
.downloadBoks {
height: 23px;
width: 150px;
font-size: 14px;
border-style: solid;
border-color: #000000;
border-width: 0px 0px 2px 0px;
margin-top: 0px;
margin-bottom:0px;
line-height: 25px;
vertical-align:middle;
box-shadow: inset 0px 0 2px 2px #777777;
}
div.sideboks{
width: 150px;
height: 50px;
margin-top: 150px;
margin-left: 54px;
position: fixed;
background-color: #B7AFA3;
border:solid;
border-width: 5px 0px 5px 5px;
border-top-left-radius: 10px;
border-bottom-left-radius: 10px;
box-shadow: inset 1px 0 0px 0px #777777;
}
This is where I currently stand with my code. At the moment, the "downloadBoks" section is purely for aesthetic purposes.
Edit: I have realized that nesting the divs might be causing the issue? So I have updated the code accordingly. Thank you for all the responses so far!