Changing color of radio-button - css

In the default CSS code for radio buttonn, it is gray when it is not selected and is blue when it is selected:
I however need it to be black in both states. Thus, I have overriden SCSS for radio buttons. Here comes my code:
HTML:
<div class="col-md-2 col-sm-6">
<div class="row">
<div class="col-md-12">
<label>Earlier experience in this field?</label>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="radio">
<label><input type="radio" formControlName="earlierExperience" value="1">Yes</label>
</div>
</div>
<div class="col-md-6">
<div class="radio">
<label><input type="radio" formControlName="earlierExperience" value="0">No</label>
</div>
</div>
</div>
</div>
CSS:
input[type='radio']:after {
width: 15px;
height: 15px;
border-radius: 50%;
top: -2px;
left: -1px;
position: relative;
background-color:white;
display: inline-block;
visibility: visible;
border: 1px solid black;
}
input[type='radio']:checked:after {
border: 4.5px solid black;
}
The problem with this code is that the small circle in the middle of the checked button is not shown anymore:
Can you help me with this?

You can use the new property accent-color which sets the colour for the input. Broswer support is limited to Chrome and Firefox at the moment so you will create fallbacks for other browsers.
input {accent-color: black;}
input {
accent-color: black;
}
<div class="col-md-2 col-sm-6">
<div class="row">
<div class="col-md-12">
<label>Earlier experience in this field?</label>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="radio">
<label><input type="radio" formControlName="earlierExperience" value="1">Yes</label>
</div>
</div>
<div class="col-md-6">
<div class="radio">
<label><input type="radio" formControlName="earlierExperience" value="0">No</label>
</div>
</div>
</div>
</div>

For solution, you can use property filter in css.
input[type='radio'] {
filter: grayscale(100%) contrast(200%);
}
input[type='radio'] {
filter: grayscale(100%) contrast(200%);
}
<div class="col-md-2 col-sm-6">
<div class="row">
<div class="col-md-12">
<label>Earlier experience in this field?</label>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="radio">
<label>
<input
type="radio"
formControlName="earlierExperience"
value="1"
/>Yes
</label>
</div>
</div>
<div class="col-md-6">
<div class="radio">
<label>
<input
type="radio"
formControlName="earlierExperience"
value="0"
/>No
</label>
</div>
</div>
</div>
</div>
Custom solution with box-shadow, pseudo-element and input binding to label
.radio {
margin-left: 0.125em;
}
.radio label {
position: relative;
padding-left: 1.5em;
cursor: pointer;
}
.radio label::after {
content: '';
width: 1em;
height: 1em;
position: absolute;
top: 0;
left: 0.25em;
border-radius: 50%;
box-shadow: inset 0 0 0 2px black;
}
input[type='radio'] {
position: absolute;
visibility: hidden;
}
input[type='radio']:checked~label::after {
box-shadow: inset 0 0 0 2px black, inset 0 0 0 4px white, inset 0 0 0 10px rgb(0, 0, 0);
}
<div class="col-md-2 col-sm-6">
<div class="row">
<div class="col-md-12">
<label>Earlier experience in this field?</label>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="radio">
<input id="yes" type="radio" name="radio" formControlName="earlierExperience" value="1" />
<label for="yes"> Yes </label>
</div>
</div>
<div class="col-md-6">
<div class="radio">
<input id="no" type="radio" name="radio" formControlName="earlierExperience" value="0" />
<label for="no"> No </label>
</div>
</div>
</div>
</div>

Related

Input:checked + after element not working

I'm trying to stylize my checkbox inputs. Everything works fine except the CHECKED option.
input:checked is working ok alone.... but when I add .filter__checkgroup::after nothing happens.
CSS:
.filter__checkgroup input[type="checkbox"] {
opacity: 0;
cursor: pointer;
width: 50px;
}
.filter__checkgroup-title {
padding-left: 6px;
}
.filter__checkgroup::before{
position: absolute;
margin-top: 5px;
border-radius: 1px;
width: 12px;
height: 12px;
border: 1px solid #999;
content: "";
cursor: pointer;
}
.filter__checkgroup::after {
position: absolute;
left: 37px;
margin-top: 7px;
height: 6px;
width: 8px;
border-left: 2px solid;
border-bottom: 2px solid;
color: #d19b4d;
transform: rotate(-45deg);
cursor: pointer;
content: "";
opacity: 0;
}
.filter__checkgroup:hover::after {
content: "";
opacity: 100 !important;
}
input:checked + .filter__checkgroup::after {
content: "" !important;
opacity: 100 !important;
}
HTML:
<section id="premmerce_filter_filter_widget-3" class="widget widget_premmerce_filter_filter_widget">
<div class="titulo-filtro"><span>SHOP BY</span></div>
<div class="filter filter--style-default" data-premmerce-filter="">
<div class="filter__item filter__item--type-checkbox" data-premmerce-filter-drop-scope="">
<div class="filter__header">
<div class="filter__title">
Categoria </div>
</div>
<div class="filter__inner " data-premmerce-filter-inner="">
<div class="filter__properties-list">
<div class="filter__properties-item ">
<div class="filter__checkgroup" data-filter-control-checkgroup="">
<div class="filter__checkgroup-body">
<div class="filter__checkgroup-link">
<input class="filter__checkgroup-control" type="checkbox" data-filter-control="" id="filter-checkgroup-id-product_cat-blazers-e-jaquetas" data-premmerce-filter-link="https://ouipetite.com.br/loja?filter_product_cat=blazers-e-jaquetas&query_type_product_cat=or">
<label class="filter__checkgroup-check" data-filter-control-label="" for="filter-checkgroup-id-product_cat-blazers-e-jaquetas"></label>
<label class="filter__checkgroup-title " for="filter-checkgroup-id-product_cat-blazers-e-jaquetas">
Blazers e Jaquetas </label>
</div>
</div>
<div class="filter__checkgroup-aside">
<span class="filter__checkgroup-count">
1 </span>
</div>
</div>
</div>
<div class="filter__properties-item ">
<div class="filter__checkgroup" data-filter-control-checkgroup="">
<div class="filter__checkgroup-body">
<div class="filter__checkgroup-link">
<input class="filter__checkgroup-control" type="checkbox" data-filter-control="" id="filter-checkgroup-id-product_cat-calcas" data-premmerce-filter-link="https://ouipetite.com.br/loja?filter_product_cat=calcas&query_type_product_cat=or">
<label class="filter__checkgroup-check" data-filter-control-label="" for="filter-checkgroup-id-product_cat-calcas"></label>
<label class="filter__checkgroup-title " for="filter-checkgroup-id-product_cat-calcas">
Calças </label>
</div>
</div>
<div class="filter__checkgroup-aside">
<span class="filter__checkgroup-count">
1 </span>
</div>
</div>
</div>
<div class="filter__properties-item ">
<div class="filter__checkgroup" data-filter-control-checkgroup="">
<div class="filter__checkgroup-body">
<div class="filter__checkgroup-link">
<input class="filter__checkgroup-control" type="checkbox" data-filter-control="" id="filter-checkgroup-id-product_cat-sem-categoria" data-premmerce-filter-link="https://ouipetite.com.br/loja?filter_product_cat=sem-categoria&query_type_product_cat=or">
<label class="filter__checkgroup-check" data-filter-control-label="" for="filter-checkgroup-id-product_cat-sem-categoria"></label>
<label class="filter__checkgroup-title " for="filter-checkgroup-id-product_cat-sem-categoria">
Sem categoria </label>
</div>
</div>
<div class="filter__checkgroup-aside">
<span class="filter__checkgroup-count">
13 </span>
</div>
</div>
</div>
<div class="filter__properties-item ">
<div class="filter__checkgroup" data-filter-control-checkgroup="">
<div class="filter__checkgroup-body">
<div class="filter__checkgroup-link">
<input class="filter__checkgroup-control" type="checkbox" data-filter-control="" id="filter-checkgroup-id-product_cat-shorts-saias" data-premmerce-filter-link="https://ouipetite.com.br/loja?filter_product_cat=shorts-saias&query_type_product_cat=or">
<label class="filter__checkgroup-check" data-filter-control-label="" for="filter-checkgroup-id-product_cat-shorts-saias"></label>
<label class="filter__checkgroup-title " for="filter-checkgroup-id-product_cat-shorts-saias">
Shorts e saias </label>
</div>
</div>
<div class="filter__checkgroup-aside">
<span class="filter__checkgroup-count">
1 </span>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="filter__item filter__item--type-checkbox" data-premmerce-filter-drop-scope="">
<div class="filter__header">
<div class="filter__title">
Cor </div>
</div>
<div class="filter__inner " data-premmerce-filter-inner="">
<div class="filter__properties-list">
<div class="filter__properties-item ">
<div class="filter__checkgroup" data-filter-control-checkgroup="">
<div class="filter__checkgroup-body">
<div class="filter__checkgroup-link">
<input class="filter__checkgroup-control" type="checkbox" data-filter-control="" id="filter-checkgroup-id-cor-dourado" data-premmerce-filter-link="https://ouipetite.com.br/loja?filter_cor=dourado&query_type_cor=or">
<label class="filter__checkgroup-check" data-filter-control-label="" for="filter-checkgroup-id-cor-dourado"></label>
<label class="filter__checkgroup-title " for="filter-checkgroup-id-cor-dourado">
Dourado </label>
</div>
</div>
<div class="filter__checkgroup-aside">
<span class="filter__checkgroup-count">
1 </span>
</div>
</div>
</div>
<div class="filter__properties-item ">
<div class="filter__checkgroup" data-filter-control-checkgroup="">
<div class="filter__checkgroup-body">
<div class="filter__checkgroup-link">
<input class="filter__checkgroup-control" type="checkbox" data-filter-control="" id="filter-checkgroup-id-cor-marrom" data-premmerce-filter-link="https://ouipetite.com.br/loja?filter_cor=marrom&query_type_cor=or">
<label class="filter__checkgroup-check" data-filter-control-label="" for="filter-checkgroup-id-cor-marrom"></label>
<label class="filter__checkgroup-title " for="filter-checkgroup-id-cor-marrom">
Marrom </label>
</div>
</div>
<div class="filter__checkgroup-aside">
<span class="filter__checkgroup-count">
1 </span>
</div>
</div>
</div>
<div class="filter__properties-item ">
<div class="filter__checkgroup" data-filter-control-checkgroup="">
<div class="filter__checkgroup-body">
<div class="filter__checkgroup-link">
<input class="filter__checkgroup-control" type="checkbox" data-filter-control="" id="filter-checkgroup-id-cor-xadrez" data-premmerce-filter-link="https://ouipetite.com.br/loja?filter_cor=xadrez&query_type_cor=or">
<label class="filter__checkgroup-check" data-filter-control-label="" for="filter-checkgroup-id-cor-xadrez"></label>
<label class="filter__checkgroup-title " for="filter-checkgroup-id-cor-xadrez">
Xadrez </label>
</div>
</div>
<div class="filter__checkgroup-aside">
<span class="filter__checkgroup-count">
1 </span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
In order for input:checked + .filter__checkgroup::after to work, the input would have to be a sibling of .filter__checkgroup, but instead it's a child.
There's no way to select this way in CSS, but you could use JS to do it. Like:
var checks = document.querySelectorAll('.filter__checkgroup-control')
checks.forEach( function(el) {
var root = el.closest('.filter__checkgroup')
el.addEventListener('click', function() {
root.classList.toggle("checked")
})
})
.filter__checkgroup::after {
content: "something";
display: block !important;
padding: 1em;
background: blue;
color: white;
clear: both;
opacity: 0;
}
.filter__checkgroup.checked::after {
opacity: 1;
}
<div class="filter__properties-item">
<div class="filter__checkgroup">
<div class="filter__checkgroup-body">
<div class="filter__checkgroup-link">
<input class="filter__checkgroup-control" type="checkbox">
<label class="filter__checkgroup-check"></label>
<label class="filter__checkgroup-title">Dourado</label>
</div>
</div>
<div class="filter__checkgroup-aside">
<span class="filter__checkgroup-count">1</span>
</div>
</div>
</div>

How to set div cell to act like th?

Hello everyone I have form which contains few different group of fields. In order to keep them together I used div elements and make them act like table elements. I used this method to avoid table elements inside of the form. In other hand some people said this approach is the same basically since I made div's to act like a table. To be honest I'm not sure if this is the best option. Here is example of my code.
form {
width: 820px;
}
form.frmLayout fieldset {
border: #ccc 2px solid;
margin: 10px;
border-radius:3px;
}
form.frmLayout legend {
font-weight: bold;
background-color: #c8e2db;
border-radius:3px;
padding: 3px;
border: #ccc 2px solid;
}
form.frmLayout label {
float: left;
font-weight: bold;
display: block;
}
form.frmLayout input[type=text] {
text-align: left;
background-color: #c8e2db;
}
div.formItem {
margin-top: 5px;
margin-bottom: 5px;
margin-left: 5px;
margin-right: 5px;
padding-top: 5px;
padding-bottom: 5px;
background-repeat: repeat-x;
clear: both;
border-bottom: #ccc 2px dashed;
}
div.formItem:last-child{
border-bottom: none;
}
div.formTbl {
display: table;
width: 100%;
}
div.frRow {
display: table-row;
text-align: left;
}
div.frCell {
display: table-cell;
padding-top: 2px;
padding-bottom: 2px;
padding-left: 0px;
padding-right: 0px;
text-align: center;
}
div.frCell span {
font-weight: bold;
}
<form name="myForm" id="myForm" method="POST" action="#" class="frmLayout">
<input type="hidden" name="frmhs_id" id="frmhs_id" value="" />
<fieldset>
<legend>My Form</legend>
<div class="formItem">
<div class="formTbl">
<div class="frRow">
<div class="frCell" style="width:60%;">
</div>
<div class="frCell" style="width:40%;">
<div class="formTbl">
<div class="frRow">
<div class="frCell" style="width:40%;">
<span>Acoustic Reflex Thresholds</span>
</div>
</div>
<div class="frRow">
<div class="frCell" style="width:10%;">
<span>500</span>
</div>
<div class="frCell" style="width:10%;">
<span>1000</span>
</div>
<div class="frCell" style="width:10%;">
<span>2000</span>
</div>
<div class="frCell" style="width:10%;">
<span>4000</span>
</div>
</div>
<div class="frRow">
<div class="frCell" style="width:10%;">
<input type="text" name="frmhs_td6" id="frmhs_td6" value="" size="4" maxlength="4" />
</div>
<div class="frCell" style="width:10%;">
<input type="text" name="frmhs_td7" id="frmhs_td7" value="" size="4" maxlength="4" />
</div>
<div class="frCell" style="width:10%;">
<input type="text" name="frmhs_td8" id="frmhs_td8" value="" size="4" maxlength="4" />
</div>
<div class="frCell" style="width:10%;">
<input type="text" name="frmhs_td9" id="frmhs_td9" value="" size="4" maxlength="4" />
</div>
</div>
<div class="frRow">
<div class="frCell" style="width:10%;">
<input type="text" name="frmhs_td15" id="frmhs_td15" value="" size="4" maxlength="4" />
</div>
<div class="frCell" style="width:10%;">
<input type="text" name="frmhs_td16" id="frmhs_td16" value="" size="4" maxlength="4" />
</div>
<div class="frCell" style="width:10%;">
<input type="text" name="frmhs_td17" id="frmhs_td17" value="" size="4" maxlength="4" />
</div>
<div class="frCell" style="width:10%;">
<input type="text" name="frmhs_td18" id="frmhs_td18" value="" size="4" maxlength="4" />
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="formItem">
<div style="float:left;">
<span><input type="submit" name="frmSubmit" id="frmhdSubmit" value="Submit"></span>
</div>
<div style="float:right;">
<span id="MsgFrm"></span>
</div>
</div>
</fieldset>
</form>
As you can see in my example above title Acoustic Reflex Thresholds is not on the center. Also I think that affects first set of div cells to change the width. I'm wondering how I can make title to go over entire length of div cell? If anyone knows how this can be fixed or is there better way to do this please let me know. Thanks in advance.
One of the limitations of css table layout is that you cannot simulate colspan, so the cells are going to be sized the same as the rest in its "column" even if its only 1 column in the row (as you can see with your "Acoustic Reflex Thresholds" heading).
What you can do is make the heading a table-caption instead of a row and that works, as you can see if you run the updated code snippet below.
There are 2 changes required:
CSS: Add the new class for the table caption
div.frCaption{
display: table-caption;
caption-side: top;
text-align: center;
font-weight: bold;
}
HTML: change the table-row to table-caption
In the row that contains with you "Acoustic Reflex Thresholds" heading:
Change the class from frRow to frCaption
Remove the frCell div altogether
[...right column...]
<div class="frCell" style="width:40%;">
<div class="formTbl">
<div class="frCaption ">
<span>Acoustic Reflex Thresholds</span>
</div>
<div class="frRow">
[... rest of rows...]
form {
width: 820px;
}
form.frmLayout fieldset {
border: #ccc 2px solid;
margin: 10px;
border-radius:3px;
}
form.frmLayout legend {
font-weight: bold;
background-color: #c8e2db;
border-radius:3px;
padding: 3px;
border: #ccc 2px solid;
}
form.frmLayout label {
float: left;
font-weight: bold;
display: block;
}
form.frmLayout input[type=text] {
text-align: left;
background-color: #c8e2db;
}
div.formItem {
margin-top: 5px;
margin-bottom: 5px;
margin-left: 5px;
margin-right: 5px;
padding-top: 5px;
padding-bottom: 5px;
background-repeat: repeat-x;
clear: both;
border-bottom: #ccc 2px dashed;
}
div.formItem:last-child{
border-bottom: none;
}
div.formTbl {
display: table;
width: 100%;
}
div.frRow {
display: table-row;
text-align: left;
}
div.frCell {
display: table-cell;
padding-top: 2px;
padding-bottom: 2px;
padding-left: 0px;
padding-right: 0px;
text-align: center;
}
div.frCell span {
font-weight: bold;
}
div.frCaption{
display: table-caption;
caption-side: top;
text-align: center;
font-weight: bold;
}
<form name="myForm" id="myForm" method="POST" action="#" class="frmLayout">
<input type="hidden" name="frmhs_id" id="frmhs_id" value="" />
<fieldset>
<legend>My Form</legend>
<div class="formItem">
<div class="formTbl">
<div class="frRow">
<div class="frCell" style="width:60%;">
</div>
<div class="frCell" style="width:40%;">
<div class="formTbl">
<div class="frCaption ">
<span>Acoustic Reflex Thresholds</span>
</div>
<div class="frRow">
<div class="frCell" style="width:10%;">
<span>500</span>
</div>
<div class="frCell" style="width:10%;">
<span>1000</span>
</div>
<div class="frCell" style="width:10%;">
<span>2000</span>
</div>
<div class="frCell" style="width:10%;">
<span>4000</span>
</div>
</div>
<div class="frRow">
<div class="frCell" style="width:10%;">
<input type="text" name="frmhs_td6" id="frmhs_td6" value="" size="4" maxlength="4" />
</div>
<div class="frCell" style="width:10%;">
<input type="text" name="frmhs_td7" id="frmhs_td7" value="" size="4" maxlength="4" />
</div>
<div class="frCell" style="width:10%;">
<input type="text" name="frmhs_td8" id="frmhs_td8" value="" size="4" maxlength="4" />
</div>
<div class="frCell" style="width:10%;">
<input type="text" name="frmhs_td9" id="frmhs_td9" value="" size="4" maxlength="4" />
</div>
</div>
<div class="frRow">
<div class="frCell" style="width:10%;">
<input type="text" name="frmhs_td15" id="frmhs_td15" value="" size="4" maxlength="4" />
</div>
<div class="frCell" style="width:10%;">
<input type="text" name="frmhs_td16" id="frmhs_td16" value="" size="4" maxlength="4" />
</div>
<div class="frCell" style="width:10%;">
<input type="text" name="frmhs_td17" id="frmhs_td17" value="" size="4" maxlength="4" />
</div>
<div class="frCell" style="width:10%;">
<input type="text" name="frmhs_td18" id="frmhs_td18" value="" size="4" maxlength="4" />
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="formItem">
<div style="float:left;">
<span><input type="submit" name="frmSubmit" id="frmhdSubmit" value="Submit"></span>
</div>
<div style="float:right;">
<span id="MsgFrm"></span>
</div>
</div>
</fieldset>
</form>

How to apply a vertical divider between div

I want to apply a vertical divider in my view.
I have done that: (see code snippet in full expanded view)
.grid-divider {
position: relative;
padding: 0;
}
.grid-divider>[class*='col-'] {
position: static;
}
.grid-divider>[class*='col-md-4']:nth-child(n+1):before {
content: "";
border-left: 1px solid #DDD;
position: absolute;
top: 0;
bottom: 0;
}
.col-padding {
padding: 0 15px;
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" />
<div class="row grid-divider">
<div class="col-md-4 text-center">
<h1>Prévisionnel</h1>
<div class="form-group">
<label class="control-label col-md-3 control-label-tv" for="field_budgetCoutMateriaux">Budget Cout Materiaux</label>
<div class="col-md-3">
<input type="number" class="form-control" name="budgetCoutMateriaux" id="field_budgetCoutMateriaux" ng-model="vm.chantier.budgetCoutMateriaux" />
</div>
</div>
</div>
<div class="col-md-4 text-center">
<h1>Prévisionnel</h1>
<div class="form-group">
<label class="control-label col-md-3 control-label-tv" for="field_budgetCoutMateriaux">Budget Cout Materiaux</label>
<div class="col-md-3">
<input type="number" class="form-control" name="budgetCoutMateriaux" id="field_budgetCoutMateriaux" ng-model="vm.chantier.budgetCoutMateriaux" />
</div>
</div>
</div>
<div class="col-md-4 text-center">
<h1>Prévisionnel</h1>
<div class="form-group">
<label class="control-label col-md-3 control-label-tv" for="field_budgetCoutMateriaux">Budget Cout Materiaux</label>
<div class="col-md-3">
<input type="number" class="form-control" name="budgetCoutMateriaux" id="field_budgetCoutMateriaux" ng-model="vm.chantier.budgetCoutMateriaux" />
</div>
</div>
</div>
</div>
But I am getting that :
I don't know how to place the divider in a better way.
Is there a way to well separate the three parts?
Thanks.
Follow this css:
.grid-divider>[class*='col-'] {
position: relative;
}
.grid-divider>[class*='col-md-4']:nth-child(n+1):before {
content: "";
border-left: 1px solid #DDD;
position: absolute;
top: 0;
bottom: 0;
right: 0;
}

layout with twitter-bootstrap form

I have difficulties to arrange the css bootstrap form .
On top of the picture below is the layout I get and just under is the layout I would like to obtain:
http://s27.postimg.org/dfztgn35v/flow_Root3665.png
This is: the first column witn names aligned on their last letter, and aligned input fields on the left and on the right.
Here is the css I used:
<div class="well">
<form class="form-horizontal" method="post">
<fieldset>
<legend>Event</legend>
<div class="form-group">
<label for="input-append date" class="col-lg-1 control-label">Date</label>
<div class="col-lg-3">
<div class="input-group input-append date" id="startDatePicker">
<input type="text" class="form-control" name="datepicker" id="datepicker1" readonly style="background-color: white" /><span class="input-group-addon add-on"><span class="glyphicon glyphicon-calendar"></span></span>
</div>
</div>
<div class="form-group">
<label for="input-append type" class="col-lg-1 control-label">Type</label>
<div class="col-lg-2">
<select class="form-control" id="select">
<option>select1</option>
<option>select2</option>
</select>
</div>
</div>
<div class="form-group">
<label for="inputTitle" class="col-lg-1 control-label">Title</label>
<div class="col-lg-6">
<input kl_virtual_keyboard_secure_input="on" class="form-control" id="inputTitle" placeholder="Title" type="text" maxlength="30">
</div>
</div>
<div class="form-group">
<label for="textArea" class="col-lg-1 control-label">Description</label>
<div class="col-lg-6">
<textarea class="form-control" rows="3" id="textArea" placeholder="Description" maxlength="200"></textarea>
</div>
</div>
</div>
</fieldset>
</form>
</div>
Thanks!
With some minor CSS you can acheive that. See example.
#soForm input,
#soForm select {
height: 50px;
font-size: 16px;
-webkit-border-radius: 0;
border-radius: 0;
border: 4px solid #444;
}
#soForm textarea {
font-size: 16px;
-webkit-border-radius: 0;
border-radius: 0;
border: 4px solid #444;
}
#soForm .input-group-addon {
height: 50px;
font-size: 13px;
-webkit-border-radius: 0;
border-radius: 0;
border-right: 4px solid #444;
border-top: 4px solid #444;
border-bottom: 4px solid #444;
}
.btn.btn-submit {
border-radius: 0;
height: 50px;
width: 100px;
border: 4px solid #444;
}
#media (min-width: 768px) {
#soForm .soForm {
margin: 10px auto;
}
#soForm .control-label {
margin-top: 25px;
}
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet" />
<div class="well">
<div class="container">
<form id="soForm" name="soForm">
<div class="form-group">
<label for="date" class="col-sm-2 control-label">Date</label>
<div class="col-sm-5">
<div class="input-group soForm">
<input type="text" class="form-control" id="date" /> <span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span>
</div>
</div>
</div>
<div class="form-group">
<label for="type" class="col-sm-2 control-label">Type</label>
<div class="col-sm-3">
<select class="form-control soForm" id="type">
<option>select1</option>
<option>select2</option>
</select>
</div>
</div>
<div class="form-group">
<label for="title" class="col-sm-2 control-label">Title</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="title" />
</div>
</div>
<div class="form-group">
<label for="description" class="col-sm-2 control-label">Description</label>
<div class="col-sm-10">
<textarea class="form-control soForm" rows="5" id="desc"></textarea>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<button type="submit" class="btn btn-default btn-submit">Submit</button>
</div>
</div>
</form>
</div>
</div>

div will not scroll under another div

I have a need to get the TextBoxesGroup scrolling under the image on the top if the visitors scroll up or under the Add to basket in the footer if the visitors scroll down.
My footer add-to-wrap is pretty much fixed but the problem is that the div will not scroll undless it goes well under the footer and then when I scroll the add-to-wrap div also scrolls.
What am I doing wrong?
<style>
.wrong_email{
display:none;
color:red;
}
.add-to-wrap {
width: 100%;
display: block;
position: fixed;
bottom: 0;
margin: 0 auto;
text-align: center;
background-color: rgba(0,0,0,0.6);
padding: 10px 0 10px 0;
z-index: 3;
}
</style>
<div class="container">
<div class="row">
<div class="col-md-4" style="padding-left:0px; padding-right:0px;">
<img src="/brand/nvite.png" class="img-responsive"/>
</div>
<div>
<form method="POST" id="login_form">
<div id='TextBoxesGroup' class="textboxes-area">
<div id="TextBoxDiv1">
<input type='text' id='textbox1' name='textbox_1' class="form-control" placeholder="Enter email address here"/>
</div>
<div class="wrong_email" id="err_1">Wrong email address</div>
<div class="divider"><img src="/mobileimages/brand_takeovers/divider_invite.png" class="img-responsive"/></div>
<div id="TextBoxDiv2">
<input type='text' id='textbox2' name='textbox_2' class="form-control" placeholder="Enter email address here"/>
</div>
<div class="wrong_email" id="err_2">Wrong email address</div>
<div class="divider"><img src="/mobileimages/brand_takeovers/divider_invite.png" class="img-responsive"/></div>
<div id="TextBoxDiv3">
<input type='text' id='textbox3' name='textbox_3' class="form-control" placeholder="Enter email address here"/>
</div>
<div class="wrong_email" id="err_3" >Wrong email address</div>
</div>
<span id='addButton' class="send-invite-more-boxes "/><img src="invitemore.png" class="img-responsive"/></span>
</div>
</div>
</div> <!-- /container -->
<div class="add-to-wrap">
<button type="submit" class="send-invite-button">Add To Basket</button>
</div>
</form>

Resources