I am trying to show a tick mark on top of the image when a user clicks on it. I have an input radio button element and label both wrapped in anchor element and inside the label i have and an image element and i use css to apply tick mark. Whenever i click on the image nothing happens. Please i would appreciate if anyone can help. Here is the snippets
.icon {
margin: 5px 0;
}
.icon input {
display: none;
}
.icon img {
vertical-align: middle;
width: 50%;
border: 2px solid greenyellow;
}
.icon input:checked {
background: rgba(0,0,0,0.5);
}
.icon input:checked::after{
content: '✔';
position: absolute;
top: 50%;
left: 50%;
width: 30px;
height: 30px;
transform: translate(-50%, -50%);
color: black;
font-size: 20px;
text-align: center;
border: 1px solid black;
border-radius: 50%;
}
<div class="row">
<a href="#" class="col-sm-4 icon">
<input type="radio" name="selimg" id="selimg1">
<label for="selimg1">
<img src="./images/baby-bottle.png">
</label>
</a>
<a href="#" class="col-sm-4 icon">
<input type="radio" name="selimg" id="selimg2">
<label for="selimg2">
<img src="./images/badge.png">
</label>
</a>
<a href="#" class="col-sm-4 icon">
<img src="./images/cardiologist.png">
</a>
</div>
::before and ::after only work on container elements, so you can not use that on your inputs.
Instead of .icon input:checked::after try using .icon input:checked + label::before.
(The rest of your CSS needs adjustments to make it show how you want, but this will at least make it show up and you can move it where it needs to be)
.icon {
margin: 5px 0;
}
.icon input {
display: none;
}
.icon img {
vertical-align: middle;
width: 50%;
border: 2px solid greenyellow;
}
.icon input:checked {
background: rgba(0, 0, 0, 0.5);
}
.icon input:checked + label::before {
content: '✔';
position: absolute;
top: 50%;
left: 50%;
width: 30px;
height: 30px;
transform: translate(-50%, -50%);
color: black;
font-size: 20px;
text-align: center;
border: 1px solid black;
border-radius: 50%;
}
<div class="row">
<a href="#" class="col-sm-4 icon">
<input type="radio" name="selimg" id="selimg1">
<label for="selimg1">
<img src="./images/baby-bottle.png">
</label>
</a>
<a href="#" class="col-sm-4 icon">
<input type="radio" name="selimg" id="selimg2">
<label for="selimg2">
<img src="./images/badge.png">
</label>
</a>
<a href="#" class="col-sm-4 icon">
<img src="./images/cardiologist.png">
</a>
</div>
Related
I have a link to my live site so you can see what my issue is. My question is how can I place my carousel into a specified place in a div?
I have a responsive div with a image in it and I want the carousel to show at the bottom of the image within the div. At the moment the carousel shows below the div and I can't figure out how to get the carousel to show within the div. I've researched but there isn't anything out there that show exactly what I'm looking for.
HTML
<div class="responsive">
<img class="image-fluid" src="assets/Header.jpg"/>
</div>
<div class="responsive">
<img class="image-fluid" src="assets/Carousel_BG_Image.jpg"/>
</div>
<!--carousel-->
<div class="carousel">
<div class="carousel-inner">
<input class="carousel-open" type="radio" id="carousel-1" name="carousel" aria-hidden="true" hidden="" checked="checked">
<div class="carousel-item">
<img class="center" src="assets/Carousel_Image_1.png">
</div>
<input class="carousel-open" type="radio" id="carousel-2" name="carousel" aria-hidden="true" hidden="">
<div class="carousel-item">
<img class="center" src="assets/Carousel_Image_2.png">
</div>
<input class="carousel-open" type="radio" id="carousel-3" name="carousel" aria-hidden="true" hidden="">
<div class="carousel-item">
<img class="center" src="assets/Carousel_Image_1.png">
</div>
<input class="carousel-open" type="radio" id="carousel-4" name="carousel" aria-hidden="true" hidden="">
<div class="carousel-item">
<img class="center" src="assets/Carousel_Image_2.png">
</div>
<label for="carousel-" class="carousel-control next control-">›</label>
<label for="carousel-2" class="carousel-control prev control-3">‹</label>
<label for="carousel-3" class="carousel-control next control-2">›</label>
<label for="carousel-4" class="carousel-control prev control-1">‹</label>
<label for="carousel-4" class="carousel-control next control-3">›</label>
<label for="carousel-2" class="carousel-control next control-1">›</label>
<label for="carousel-1" class="carousel-control prev control-2">‹</label>
<label for="carousel-1" class="carousel-control next control-4">›</label>
<ol class="carousel-indicators">
<li>
<label for="carousel-1" class="carousel-bullet">•</label>
</li>
<li>
<label for="carousel-2" class="carousel-bullet">•</label>
</li>
<li>
<label for="carousel-3" class="carousel-bullet">•</label>
</li>
<li>
<label for="carousel-4" class="carousel-bullet">•</label>
</li>
</ol>
</div>
</div>
<!--end carousel-->
<div class="responsive">
<img class="image-fluid" src="assets/Inner_Section_Two.jpg"/>
</div>
<div class="responsive">
<img class="image-fluid" src="assets/Travel.jpg"/>
</div>
<div class="responsive">
<img class="image-fluid" src="assets/Footer.jpg"/>
</div>
CSS
/* carousel */
.center {
display: block;
margin-left: auto;
margin-right: auto;
}
.carousel {
position: relative;
box-shadow: 0px 1px 6px rgba(0, 0, 0, 0.64);
margin-top: 0px;
}
.carousel-inner {
position: center;
overflow: hidden;
width: 100%;
}
.carousel-open:checked + .carousel-item {
position: static;
opacity: 100;
}
.carousel-item {
position: absolute;
opacity: 0;
-webkit-transition: opacity 0.6s ease-out;
transition: opacity 0.6s ease-out;
}
.carousel-item img {
position: center;
display: block;
height: auto;
max-width: 100%;
}
.carousel-control {
background: rgba(0, 0, 0, 0.28);
border-radius: 50%;
color: #fff;
cursor: pointer;
display: none;
font-size: 40px;
height: 40px;
line-height: 35px;
position: absolute;
top: 50%;
-webkit-transform: translate(0, -50%);
cursor: pointer;
-ms-transform: translate(0, -50%);
transform: translate(0, -50%);
text-align: center;
width: 40px;
z-index: 10;
}
.carousel-control.prev {
left: 2%;
}
.carousel-control.next {
right: 2%;
}
.carousel-control:hover {
background: rgba(0, 0, 0, 0.8);
color: #aaaaaa;
}
#carousel-1:checked ~ .control-1,
#carousel-2:checked ~ .control-2,
#carousel-3:checked ~ .control-3,
#carousel-4:checked ~ .control-4 {
display: block;
}
.carousel-indicators {
list-style: none;
margin: 0;
padding: 0;
position: absolute;
bottom: 2%;
left: 0;
right: 0;
text-align: center;
z-index: 10;
}
.carousel-indicators li {
display: inline-block;
margin: 0 5px;
}
.carousel-bullet {
color: #fff;
cursor: pointer;
display: block;
font-size: 35px;
}
.carousel-bullet:hover {
color: #aaaaaa;
}
#carousel-1:checked ~ .control-1 ~ .carousel-indicators li:nth-child(1) .carousel-bullet,
#carousel-2:checked ~ .control-2 ~ .carousel-indicators li:nth-child(2) .carousel-bullet,
#carousel-3:checked ~ .control-3 ~ .carousel-indicators li:nth-child(3) .carousel-bullet,
#carousel-4:checked ~ .control-4 ~ .carousel-indicators li:nth-child(4) .carousel-bullet {
color: #428bca;
}
#title {
width: 100%;
position: absolute;
padding: 0px;
margin: 0px auto;
text-align: center;
font-size: 27px;
color: rgba(255, 255, 255, 1);
font-family: 'Open Sans', sans-serif;
z-index: 9999;
text-shadow: 0px 1px 2px rgba(0, 0, 0, 0.33), -1px 0px 2px rgba(255, 255, 255, 0);
}
Here a photo of where I would like the carousel to be placement
I've tried inserting the separate div within the responsive div but it just makes the images larger.
Here's a link to the live site
put both in 1 div and give the parent div position relative. and the child div position absolute. then use carousel.
somoething like this
<div position-relative>
<div position-absolute width-100% top-0 right-0>
img/background this div will cover the whole parent div
and it will be absolute so whatever you put after this div will overlap with this div.
</div>
<div carousel>
put your carousel here it will overlap your bg.
</div>
</div>
this will solve your problem
I have a problem with focusing link with tab key in FireFox. Focusing works normal in chrome but in FireFox it loops inside one element.
I have created a example with the described behavior(open it in FireFox)
https://jsfiddle.net/e4gcmk6z/2/
.notVisible {
opacity: 0;
position: fixed;
}
.selection-box-v2 .selection-item {
background: #ffffff;
border: solid;
border-width: 1px;
border-color: #9c9c9c;
border-radius: 3px;
padding: 10px;
display: block;
}
label.label-outline {
font-size: 14px !important;
-webkit-transform: translate(0px, 12px);
transform: translate(0px, 12px);
position: absolute;
padding-right: 5px;
padding-left: 5px;
margin-top: 0px;
left: 18px;
line-height: normal !important;
cursor: text;
color: #5f5f5f;
z-index: 1;
}
.selection-box-v2 .co-calendar {
color: #3071a9;
font-size: 20px;
margin-right: 20px;
margin-top: 10px;
position: absolute;
right: 0;
pointer-events: none;
z-index: 1;
}
<div>
Tab key is not focusing link 2 in FireFox
</div>
<div class="links-v2">
<a tabindex="0" href="javascript:void(0);">
link 1
</a>
</div>
<br>
<div class="col-xs-12 selection-box-v2 pad">
<label tabindex="0" role="radio">
<input type="radio" class="shipModeId notVisible" name="shipModeId_1" value="p79652">
<span class="selection-item preferred-arrival-date-v2 inner-addon right-addon calendar-box">
<input class="ship-date" type="hidden" value="">
<span class="padClause" style="display: none">
<p class="checkout-ship-padClause"> </p>
</span>
<span class="ship-type-and-cost" style="margin-top: 10px;">some other elements
<span class="shipping-cost span-inline calendar-arrival"></span>
</span>
</span>
</label>
</div>
<br>
<div class="links-v2">
<a tabindex="0" href="javascript:void(0);">
link 2
</a>
</div>
Any one has and idea what could be wrong?
You can remove the tab index of the two a tags since they are not needed, also there are some input tags that are not visible on the screen, these need to be set to tabIndex as -1 so that these elements are skipped!
.notVisible {
opacity: 0;
position: fixed;
}
.selection-box-v2 .selection-item {
background: #ffffff;
border: solid;
border-width: 1px;
border-color: #9c9c9c;
border-radius: 3px;
padding: 10px;
display: block;
}
label.label-outline {
font-size: 14px !important;
-webkit-transform: translate(0px, 12px);
transform: translate(0px, 12px);
position: absolute;
padding-right: 5px;
padding-left: 5px;
margin-top: 0px;
left: 18px;
line-height: normal !important;
cursor: text;
color: #5f5f5f;
z-index: 1;
}
.selection-box-v2 .co-calendar {
color: #3071a9;
font-size: 20px;
margin-right: 20px;
margin-top: 10px;
position: absolute;
right: 0;
pointer-events: none;
z-index: 1;
}
<div>
Tab is not focusing link 2 in FireFox
</div>
<div class="links-v2">
<a href="javascript:void(0);">
link 1
</a>
</div>
<br>
<div class="col-xs-12 selection-box-v2 pad">
<label tabindex="0" role="radio">
<input type="radio" tabindex="-1" class="shipModeId notVisible" name="shipModeId_1" value="p79652">
<span class="selection-item preferred-arrival-date-v2 inner-addon right-addon calendar-box">
<input class="ship-date" tabindex="-1" type="hidden" value=""/>
<span class="padClause" style="display: none">
<p class="checkout-ship-padClause"> </p>
</span>
<span class="ship-type-and-cost" style="margin-top: 10px;">some other elements
<span class="shipping-cost span-inline calendar-arrival"></span>
</span>
</span>
</label>
</div>
<br>
<div class="links-v2">
<a href="javascript:void(0);">
link 2
</a>
</div>
checked in Firefox 67.0.4 (64-bit)
I'm Having trouble with my radio buttons, I don't want them to entirely fill the circle. Any word of advice. Here is link to what is happening on Codepen.
https://codepen.io/winterlion/pen/LYYJwZP
.item .text {
position: absolute;
display: inline-block;
cursor: pointer;
}
.item .text:before {
content: '';
display: inline-block;
vertical-align: text-bottom;
width: 18px;
height: 18px;
margin-right: 5px;
border-radius: 50%;
border: 2px solid #235b96;
outline: none;
box-shadow: 0 0 5px 0px gray inset;
}
.item input[type="radio"] {
display: none;
}
.item input[type="radio"]:checked+label .text:before {
content: '';
color: #235b96;
background-color: #479623;
}
<div class="item">
<input type="radio" id="r1" name="group1" value="trial1" />
<label for="r1" class="wrapper">
<span class="background"></span>
<h1 class="rp-text">Radio Buttons</h1>
<hr class="split-hr">
<br>
<span class="text"></span>
</label>
</div>
<div class="item">
<input type="radio" id="r2" name="group1" value="trial2" />
<label for="r2" class="wrapper">
<span class="background"></span>
<h1 class="rp-text">Buttons</h1>
<span class="text"></span>
</label>
</div>
If I understood your question right, you just want to move styles related to a green dot to an ::after pseudo element that must be a bit smaller than ::before.
.item .text {
position: absolute;
display: inline-block;
cursor: pointer;
}
.item .text::before,
.item .text::after {
content: '';
display: inline-block;
margin-right: 5px;
border-radius: 50%;
}
.item .text::before {
width: 18px;
height: 18px;
border: 2px solid #235b96;
box-shadow: 0 0 5px 0px gray inset;
}
.item input[type="radio"]:checked + label .text::after {
width: 12px;
height: 12px;
position: absolute;
left: 5px;
top: 5px;
}
.item input[type="radio"] {
display: none;
}
.item input[type="radio"]:checked + label .text:after {
color: #235b96;
background-color: #479623;
}
<div class="item">
<input type="radio" id="r1" name="group1" value="trial1" />
<label for="r1" class="wrapper">
<span class="background"></span>
<h1 class="rp-text">Radio Buttons</h1>
<hr class="split-hr">
<br>
<span class="text"></span>
</label>
</div>
<div class="item">
<input type="radio" id="r2" name="group1" value="trial2" />
<label for="r2" class="wrapper">
<span class="background"></span>
<h1 class="rp-text">Buttons</h1>
<span class="text"></span>
</label>
</div>
Currently I am trying to create some links that look like buttons. It's working fairly well, except I want to be able to align them horizontally. This what I have so far:
.border {
display: table;
width: 220px;
height: 120px;
border: 2px solid #1E5034;
transition: all 250ms ease-out;
box-sizing: border-box;
border-spacing: 10px;
float:left;
}
.border:hover {
border-spacing: 2px;
}
a.btn {
display: table-cell;
vertical-align: middle;
text-align: center;
color: #ffffff;
font: 17.5px sans-serif;
text-decoration: none;
background-color: #1E5034;
line-height: 20px;
margin-bottom: 0;
}
a.btn:hover,
a.btn:focus,
a.btn:active,
a.btn:visited,
a.btn:link {
color: #ffffff;
background-color: #1E5034;
text-decoration: none;
cursor: pointer;
}
<div class="btn-grp">
<div class="border">
<a class="btn" href="#">Some really long text link #1</a>
</div>
<div class="border">
<a class="btn" href="#">Some other really long text link #2</a>
</div>
<div class="border">
<a class="btn" href="#">Some more really really long text link #3</a>
</div>
<div class="border">
<a class="btn" href="#">The last really long text link #4</a>
</div>
</div>
Edit:
If it has display:inline-block; it will mess up with formatting with heights and not center the text.
I'm trying to create something as shown here, but then be able to center this on the page as well.
Thanks!
Support in all browsers including IE.
.btn-grp {
position: absolute;
top: 0%;
left: 50%;
transform: translate(-50%, 0%);
width: 80vw;
}
.border {
display: table;
width: 25%;
height: 120px;
border: 2px solid #1E5034;
transition: all 250ms ease-out;
box-sizing: border-box;
border-spacing: 10px;
float: left;
}
.border:hover {
border-spacing: 2px;
}
a.btn {
display: table-cell;
vertical-align: middle;
text-align: center;
color: #ffffff;
font: 17.5px sans-serif;
text-decoration: none;
background-color: #1E5034;
line-height: 20px;
margin-bottom: 0;
}
a.btn:hover,
a.btn:focus,
a.btn:active,
a.btn:visited,
a.btn:link {
color: #ffffff;
background-color: #1E5034;
text-decoration: none;
cursor: pointer;
}
<div class="btn-grp">
<div class="border">
<a class="btn" href="#">Some really long text link #1</a>
</div>
<div class="border">
<a class="btn" href="#">Some other really long text link #2</a>
</div>
<div class="border">
<a class="btn" href="#">Some more really really long text link #3</a>
</div>
<div class="border">
<a class="btn" href="#">The last really long text link #4</a>
</div>
</div>
If you need the 4 div at vertically centered then use:
.btn-grp {
position: absolute;
top: 50%;
left:50%;
transform: translate(-50%, -50%);
}
Because you are using width in px thats why then don't come in a single row...So try to use % width i.e. 25%...
.border {
display: table;
width: 25%;
height: 120px;
border: 2px solid #1E5034;
transition: all 250ms ease-out;
box-sizing: border-box;
border-spacing: 10px;
float: left;
}
.border:hover {
border-spacing: 2px;
}
a.btn {
display: table-cell;
vertical-align: middle;
text-align: center;
color: #ffffff;
font: 17.5px sans-serif;
text-decoration: none;
background-color: #1E5034;
line-height: 20px;
margin-bottom: 0;
}
a.btn:hover,
a.btn:focus,
a.btn:active,
a.btn:visited,
a.btn:link {
color: #ffffff;
background-color: #1E5034;
text-decoration: none;
cursor: pointer;
}
<div class="btn-grp">
<div class="border">
<a class="btn" href="#">Some really long text link #1</a>
</div>
<div class="border">
<a class="btn" href="#">Some other really long text link #2</a>
</div>
<div class="border">
<a class="btn" href="#">Some more really really long text link #3</a>
</div>
<div class="border">
<a class="btn" href="#">The last really long text link #4</a>
</div>
</div>
Well I recommend you to use Flexbox here...It will give you the full control to align the item vertically and horizontally...Also you will need to use :after for the background, as flexbox does not allow border-spacing
.btn-grp {
display: flex;
justify-content: center;
}
.border {
width: 20%;
height: 120px;
border: 2px solid #1E5034;
transition: all 250ms ease-out;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: center;
position: relative;
padding: 10px;
}
a.btn {
text-align: center;
color: #ffffff;
font: 16px sans-serif;
text-decoration: none;
line-height: 20px;
margin-bottom: 0;
flex: 1;
}
a.btn:hover,
a.btn:focus,
a.btn:active,
a.btn:visited {
color: #ffffff;
background-color: #1E5034;
text-decoration: none;
cursor: pointer;
}
.border:before {
content: "";
top: 0;
right: 0;
bottom: 0;
left: 0;
background: #1f5034;
position: absolute;
z-index: -1;
transition: all .3s ease;
transform: scale(0.85);
}
.border:hover:before {
transform: scale(0.95);
}
<div class="btn-grp">
<div class="border">
<a class="btn" href="#">Some really long text link #1</a>
</div>
<div class="border">
<a class="btn" href="#">Some other really long text link #2</a>
</div>
<div class="border">
<a class="btn" href="#">Some more really really long text link #3</a>
</div>
<div class="border">
<a class="btn" href="#">The last really long text link #4</a>
</div>
</div>
Well for IE 8 support use display:inline-block and transform to place the content in center...
.btn-grp {
text-align: center;
font-size: 0;
}
.border {
width: 20%;
height: 120px;
border: 2px solid #1E5034;
transition: all 250ms ease-out;
box-sizing: border-box;
display: inline-block;
vertical-align: top;
position: relative;
padding: 10px;
}
a.btn {
text-align: center;
color: #ffffff;
font: 16px sans-serif;
text-decoration: none;
line-height: 20px;
margin-bottom: 0;
position: relative;
top: 50%;
transform: translateY(-50%);
display: block;
}
.border:before {
content: "";
top: 0;
right: 0;
bottom: 0;
left: 0;
background: #1f5034;
position: absolute;
z-index: -1;
transition: all .3s ease;
transform: scale(0.85);
}
.border:hover:before {
transform: scale(0.95);
}
<div class="btn-grp">
<div class="border">
<a class="btn" href="#">Some really long text link #1</a>
</div>
<div class="border">
<a class="btn" href="#">Some other really long text link #2</a>
</div>
<div class="border">
<a class="btn" href="#">Some more really really long text link #3</a>
</div>
<div class="border">
<a class="btn" href="#">The last really long text link #4</a>
</div>
</div>
I made a CSS code, which changes style properties two other html elements, with events.
When a check box is checked, I want to change background colour of a label box and a div tag. And when I uncheck the check box, the background colour must be toggled with the previous.
The code is working on changing css properties of label tag. But not working for div tag.
Here is the CSS:
input[type=checkbox] {
display:none;
}
input[type=checkbox] + label
{
background: #999;
height: 16px;
width: 16px;
display:inline-block;
padding: 0 0 0 0px;
}
input[type=checkbox]:checked + label
{
background: #0080FF;
height: 16px;
width: 16px;
display:inline-block;
padding: 0 0 0 0px;
}
input[type=checkbox]:checked ~ #menu_content
{
height:100vh;
width:25vh;
position:fixed;
left:0;
top:11%;
background-color:#41a3d8;
}
input[type=checkbox]:not(:checked) ~ #menu_content
{
height:100vh;
width:25vh;
position:fixed;
left:0;
top:11%;
background-color:#fff;
border-style:solid;
border-width:1px 1px 1px 1px;
}
Here is the html code:
<div id="header">
<span id="nav_button">
<input type='checkbox' name='thing' id="thing"/>
<label for="thing">
</label>
</span>
<span id="title">
<TITLE>
</span>
</div>
<div id="menu_content">
<p id="menu_head">
Nav
</p>
<a href="#" id="menu_links">
Link1
</a>
<a href="#" id="menu_links">
Link2
</a>
<a href="#" id="menu_links">
Link3
</a>
</div>
I'm trying to do this, without using any kind of scripts
The ~ selectors only works with it siblings, so I would recommend making the div a sibling of the checkbox like the example.
input[type=checkbox] {
display:none;
}
input[type=checkbox] + label
{
background: #999;
height: 16px;
width: 16px;
display:inline-block;
padding: 0 0 0 0px;
}
input[type=checkbox]:checked + label
{
background: #0080FF;
height: 16px;
width: 16px;
display:inline-block;
padding: 0 0 0 0px;
}
input[type=checkbox]:checked ~ #menu_content
{
height:100vh;
width:25vh;
position:fixed;
left:0;
top:11%;
background-color:#41a3d8;
}
input[type=checkbox]:not(:checked) ~ #menu_content
{
height:100vh;
width:25vh;
position:fixed;
left:0;
top:11%;
background-color:#fff;
border-style:solid;
border-width:1px 1px 1px 1px;
}
<div id="header">
<span id="nav_button">
<input type='checkbox' name='thing' id="thing"/>
<label for="thing">
</label>
<div id="menu_content">
<p id="menu_head">
Nav
</p>
<a href="#" id="menu_links">
Link1
</a>
<a href="#" id="menu_links">
Link2
</a>
<a href="#" id="menu_links">
Link3
</a>
</div>
</span>
<span id="title">
<TITLE>
</span>
</div>
Another option would be using Js..
or with pure css will be using css selectors in the url using :target() https://stackoverflow.com/a/9442590/2894798 (haven't tried...)
As you can see, the first two CSS rules work as desired, but the other ones don't. The reason is that label is a sibling to that input and follows directly after that input, which the + in the CSS selector corresponds to.
But #menu_content is not a sibling (as ~ would require) , it's two levels higher.
You won't be able to do this without a script, there are no CSS methods to select ancestors.
input[type=checkbox]+label {
background: #999;
height: 16px;
width: 16px;
display: inline-block;
padding: 0 0 0 0px;
}
input[type=checkbox]:checked+label {
background: #0080FF;
height: 16px;
width: 16px;
display: inline-block;
padding: 0 0 0 0px;
}
input[type=checkbox]:checked~#menu_content {
height: 100vh;
width: 25vh;
position: fixed;
left: 0;
top: 11%;
background-color: #41a3d8;
}
input[type=checkbox]:not(:checked)~#menu_content {
height: 100vh;
width: 25vh;
position: fixed;
left: 0;
top: 11%;
background-color: #fff;
border-style: solid;
border-width: 1px 1px 1px 1px;
}
<div id="header">
<span id="nav_button">
<input type='checkbox' name='thing' id="thing"/>
<label for="thing">
</label>
</span>
<span id="title">
<TITLE>
</span>
</div>
<div id="menu_content">
<p id="menu_head">
Nav
</p>
<a href="#" id="menu_links">
Link1
</a>
<a href="#" id="menu_links">
Link2
</a>
<a href="#" id="menu_links">
Link3
</a>
</div>