Updated reset button positioning and styling
Updated reset button positioning to use correct styling to work across all browsers.
This commit is contained in:
@@ -114,6 +114,7 @@ p.subheading {
|
||||
font-weight: 500;
|
||||
line-height: 28px;
|
||||
letter-spacing: .015px;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.b-platevisual__weight{
|
||||
@@ -154,6 +155,11 @@ p.subheading {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
|
||||
.b-platevisual__weightdifference{
|
||||
display: none;
|
||||
}
|
||||
|
||||
.b-calulatorinputs {
|
||||
height: 40vh;
|
||||
width: auto;
|
||||
@@ -245,6 +251,11 @@ label {
|
||||
line-height: 14px;
|
||||
}
|
||||
|
||||
.b-calulatorinputs__weightinputcontainer{
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.input-weight {
|
||||
height: 33px;
|
||||
width: 196px;
|
||||
@@ -292,8 +303,10 @@ input.input-calculate:focus{
|
||||
|
||||
.b-infoentry__reset{
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
transform: translate(-132%, 132%);
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(50%, -32%);
|
||||
-webkit-transform: translate(50%, -32%);
|
||||
color: #808285;
|
||||
font-family: "Zilla Slab";
|
||||
font-size: 14px;
|
||||
@@ -301,6 +314,9 @@ input.input-calculate:focus{
|
||||
font-weight: 500;
|
||||
letter-spacing: 0.75px;
|
||||
display: none;
|
||||
background:none;
|
||||
border:none;
|
||||
margin:0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
10
index.html
10
index.html
@@ -49,7 +49,7 @@
|
||||
<div class="b-platevisual__plates b-platevisual__plates--right">
|
||||
</div>
|
||||
</div>
|
||||
<p class="subheading">Offset: <span class="input-difference">0</span> LBS</p>
|
||||
<p class="b-platevisual__weightdifference subheading">Offset: <span class="input-difference">0</span> LBS</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -89,9 +89,11 @@
|
||||
<div class="b-calulatorinputs__infoentry">
|
||||
<div class="b-calulatorinputs__inputcontainer">
|
||||
<div class="b-calulatorinputs__weightinput">
|
||||
<label for="Weight">WEIGHT (LBS)</label>
|
||||
<input type="number" inputmode="numeric" pattern="[0-9]*" class="b-infoentry__input input-element input-weight" name="Weight" placeholder="What are you lifting? (LBS)" id="Weight">
|
||||
<input type="button" name="reset" value="Reset" class="b-infoentry__reset">
|
||||
<div class="b-calulatorinputs__weightinputcontainer">
|
||||
<label for="Weight">WEIGHT (LBS)</label>
|
||||
<input type="number" inputmode="numeric" pattern="[0-9]*" class="b-infoentry__input input-element input-weight" name="Weight" placeholder="Enter your weight (LBS)" id="Weight">
|
||||
<input type="button" name="reset" value="Reset" class="b-infoentry__reset">
|
||||
</div>
|
||||
<input type="button" class="b-infoentry__button submit-element input-calculate" name="Calculate" value="LIFT" onclick="startcalc()">
|
||||
</div>
|
||||
<a href="#options">
|
||||
|
||||
@@ -116,7 +116,8 @@
|
||||
|
||||
//show reset button on calculate
|
||||
jQuery(".input-calculate").click(function(){
|
||||
jQuery(".b-infoentry__reset").show();
|
||||
jQuery(".b-infoentry__reset, .b-platevisual__weightfinal, .b-platevisual__weightdifference").show();
|
||||
|
||||
});
|
||||
|
||||
//reset inputs and plate visuals
|
||||
@@ -124,7 +125,7 @@
|
||||
jQuery(".input-weight, .input-weightsneeded").val('');
|
||||
jQuery(".input-final, .input-difference").html('0');
|
||||
jQuery(".b-platevisual__plates").html('');
|
||||
jQuery(".b-infoentry__reset").hide();
|
||||
jQuery(".b-infoentry__reset, .b-platevisual__weightfinal, .b-platevisual__weightdifference").hide();
|
||||
});
|
||||
|
||||
//Saves scroll position on focus and restores
|
||||
|
||||
Reference in New Issue
Block a user