Related
I have been working on this extension and I am trying to put these buttons in the same place but they look like this. They don't line up
.fversion-button {
border: 2px solid #8f7a66;
background: #8f7a66;
background: -webkit-gradient(linear, left top, left bottom, from(#8f7a66), to(#8f7a66));
background: -webkit-linear-gradient(top, #8f7a66, #8f7a66);
background: -moz-linear-gradient(top, #8f7a66, #8f7a66);
background: -ms-linear-gradient(top, #8f7a66, #8f7a66);
background: -o-linear-gradient(top, #8f7a66, #8f7a66);
background-image: -ms-linear-gradient(top, #8f7a66 0%, #8f7a66 100%);
padding: 10px 20px;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
-webkit-box-shadow: rgba(255, 255, 255, 0.4) 0 0px 0, inset rgba(255, 255, 255, 0.4) 0 0px 0;
-moz-box-shadow: rgba(255, 255, 255, 0.4) 0 0px 0, inset rgba(255, 255, 255, 0.4) 0 0px 0;
box-shadow: rgba(255, 255, 255, 0.4) 0 0px 0, inset rgba(255, 255, 255, 0.4) 0 0px 0;
color: #ffffff;
text-decoration: none;
vertical-align: left;
float: left;
}
.sversion-button {
border: 2px solid #8f7a66;
background: #8f7a66;
background: -webkit-gradient(linear, left top, left bottom, from(#8f7a66), to(#8f7a66));
background: -webkit-linear-gradient(top, #8f7a66, #8f7a66);
background: -moz-linear-gradient(top, #8f7a66, #8f7a66);
background: -ms-linear-gradient(top, #8f7a66, #8f7a66);
background: -o-linear-gradient(top, #8f7a66, #8f7a66);
background-image: -ms-linear-gradient(top, #8f7a66 0%, #8f7a66 100%);
padding: 10px 20px;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
-webkit-box-shadow: rgba(255, 255, 255, 0.4) 0 0px 0, inset rgba(255, 255, 255, 0.4) 0 0px 0;
-moz-box-shadow: rgba(255, 255, 255, 0.4) 0 0px 0, inset rgba(255, 255, 255, 0.4) 0 0px 0;
box-shadow: rgba(255, 255, 255, 0.4) 0 0px 0, inset rgba(255, 255, 255, 0.4) 0 0px 0;
color: #ffffff;
text-decoration: none;
vertical-align: middle;
float: center;
}
.tversion-button {
border: 2px solid #8f7a66;
background: #8f7a66;
background: -webkit-gradient(linear, left top, left bottom, from(#8f7a66), to(#8f7a66));
background: -webkit-linear-gradient(top, #8f7a66, #8f7a66);
background: -moz-linear-gradient(top, #8f7a66, #8f7a66);
background: -ms-linear-gradient(top, #8f7a66, #8f7a66);
background: -o-linear-gradient(top, #8f7a66, #8f7a66);
background-image: -ms-linear-gradient(top, #8f7a66 0%, #8f7a66 100%);
padding: 10px 20px;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
-webkit-box-shadow: rgba(255, 255, 255, 0.4) 0 0px 0, inset rgba(255, 255, 255, 0.4) 0 0px 0;
-moz-box-shadow: rgba(255, 255, 255, 0.4) 0 0px 0, inset rgba(255, 255, 255, 0.4) 0 0px 0;
box-shadow: rgba(255, 255, 255, 0.4) 0 0px 0, inset rgba(255, 255, 255, 0.4) 0 0px 0;
color: #ffffff;
text-decoration: none;
vertical-align: right;
float: right;
}
2048
16384
65536
I am kind of new to CSS.
I would abandon the use of float and make them inline-block elements. Also, remove the vertical align - or make them all middle (left and right are not valid values for vertical align)
.fversion-button {
border: 2px solid #8f7a66;
background: #8f7a66;
background: -webkit-gradient(linear, left top, left bottom, from(#8f7a66), to(#8f7a66));
background: -webkit-linear-gradient(top, #8f7a66, #8f7a66);
background: -moz-linear-gradient(top, #8f7a66, #8f7a66);
background: -ms-linear-gradient(top, #8f7a66, #8f7a66);
background: -o-linear-gradient(top, #8f7a66, #8f7a66);
background-image: -ms-linear-gradient(top, #8f7a66 0%, #8f7a66 100%);
padding: 10px 20px;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
-webkit-box-shadow: rgba(255, 255, 255, 0.4) 0 0px 0, inset rgba(255, 255, 255, 0.4) 0 0px 0;
-moz-box-shadow: rgba(255, 255, 255, 0.4) 0 0px 0, inset rgba(255, 255, 255, 0.4) 0 0px 0;
box-shadow: rgba(255, 255, 255, 0.4) 0 0px 0, inset rgba(255, 255, 255, 0.4) 0 0px 0;
color: #ffffff;
text-decoration: none;
vertical-align: middle;
display:inline-block;
}
.sversion-button {
border: 2px solid #8f7a66;
background: #8f7a66;
background: -webkit-gradient(linear, left top, left bottom, from(#8f7a66), to(#8f7a66));
background: -webkit-linear-gradient(top, #8f7a66, #8f7a66);
background: -moz-linear-gradient(top, #8f7a66, #8f7a66);
background: -ms-linear-gradient(top, #8f7a66, #8f7a66);
background: -o-linear-gradient(top, #8f7a66, #8f7a66);
background-image: -ms-linear-gradient(top, #8f7a66 0%, #8f7a66 100%);
padding: 10px 20px;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
-webkit-box-shadow: rgba(255, 255, 255, 0.4) 0 0px 0, inset rgba(255, 255, 255, 0.4) 0 0px 0;
-moz-box-shadow: rgba(255, 255, 255, 0.4) 0 0px 0, inset rgba(255, 255, 255, 0.4) 0 0px 0;
box-shadow: rgba(255, 255, 255, 0.4) 0 0px 0, inset rgba(255, 255, 255, 0.4) 0 0px 0;
color: #ffffff;
text-decoration: none;
vertical-align: middle;
display:inline-block;
}
.tversion-button {
border: 2px solid #8f7a66;
background: #8f7a66;
background: -webkit-gradient(linear, left top, left bottom, from(#8f7a66), to(#8f7a66));
background: -webkit-linear-gradient(top, #8f7a66, #8f7a66);
background: -moz-linear-gradient(top, #8f7a66, #8f7a66);
background: -ms-linear-gradient(top, #8f7a66, #8f7a66);
background: -o-linear-gradient(top, #8f7a66, #8f7a66);
background-image: -ms-linear-gradient(top, #8f7a66 0%, #8f7a66 100%);
padding: 10px 20px;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
-webkit-box-shadow: rgba(255, 255, 255, 0.4) 0 0px 0, inset rgba(255, 255, 255, 0.4) 0 0px 0;
-moz-box-shadow: rgba(255, 255, 255, 0.4) 0 0px 0, inset rgba(255, 255, 255, 0.4) 0 0px 0;
box-shadow: rgba(255, 255, 255, 0.4) 0 0px 0, inset rgba(255, 255, 255, 0.4) 0 0px 0;
color: #ffffff;
text-decoration: none;
vertical-align: middle;
display:inline-block;
}
2048
16384
65536
If you need to split them across the line, you can put them in a flex container:
.container { /* flex for even spacing */
display: flex;
justify-content: space-between;
}
/* shared styles - could use a class on each button for shared styles instead of repeating (i have just used the extra selector I made from the container) */
.container > a {
border: 2px solid #8f7a66;
background: #8f7a66;
background: -webkit-gradient(linear, left top, left bottom, from(#8f7a66), to(#8f7a66));
background: -webkit-linear-gradient(top, #8f7a66, #8f7a66);
background: -moz-linear-gradient(top, #8f7a66, #8f7a66);
background: -ms-linear-gradient(top, #8f7a66, #8f7a66);
background: -o-linear-gradient(top, #8f7a66, #8f7a66);
background-image: -ms-linear-gradient(top, #8f7a66 0%, #8f7a66 100%);
padding: 10px 20px;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
-webkit-box-shadow: rgba(255, 255, 255, 0.4) 0 0px 0, inset rgba(255, 255, 255, 0.4) 0 0px 0;
-moz-box-shadow: rgba(255, 255, 255, 0.4) 0 0px 0, inset rgba(255, 255, 255, 0.4) 0 0px 0;
box-shadow: rgba(255, 255, 255, 0.4) 0 0px 0, inset rgba(255, 255, 255, 0.4) 0 0px 0;
color: #ffffff;
text-decoration: none;
vertical-align: middle;
display: inline-block;
<div class="container">
2048
16384
65536
</div>
there is no CSS like
float: center
which is written in .sversion-button class . you should replace it with
float: left.
I think it will take the button in the right position which you want.
You need to remove float center and making chnages in html and css,you will get this
.fl1{
float:left;
width:33.33%;
margin:5px auto;
}
.fl2{
float:left;
width:33.33%;
text-align:center;
margin:5px auto;
}
.fl3{
float:left;
width:33.33%;
text-align:right;
margin:5px auto;
}
.fversion-button {
border: 2px solid #8f7a66;
background: #8f7a66;
background: -webkit-gradient(linear, left top, left bottom, from(#8f7a66), to(#8f7a66));
background: -webkit-linear-gradient(top, #8f7a66, #8f7a66);
background: -moz-linear-gradient(top, #8f7a66, #8f7a66);
background: -ms-linear-gradient(top, #8f7a66, #8f7a66);
background: -o-linear-gradient(top, #8f7a66, #8f7a66);
background-image: -ms-linear-gradient(top, #8f7a66 0%, #8f7a66 100%);
padding: 10px 20px;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
-webkit-box-shadow: rgba(255,255,255,0.4) 0 0px 0, inset rgba(255,255,255,0.4) 0 0px 0;
-moz-box-shadow: rgba(255,255,255,0.4) 0 0px 0, inset rgba(255,255,255,0.4) 0 0px 0;
box-shadow: rgba(255,255,255,0.4) 0 0px 0, inset rgba(255,255,255,0.4) 0 0px 0;
color: #ffffff;
text-decoration: none;
vertical-align: middle;
}
.sversion-button {
border: 2px solid #8f7a66;
background: #8f7a66;
background: -webkit-gradient(linear, left top, left bottom, from(#8f7a66), to(#8f7a66));
background: -webkit-linear-gradient(top, #8f7a66, #8f7a66);
background: -moz-linear-gradient(top, #8f7a66, #8f7a66);
background: -ms-linear-gradient(top, #8f7a66, #8f7a66);
background: -o-linear-gradient(top, #8f7a66, #8f7a66);
background-image: -ms-linear-gradient(top, #8f7a66 0%, #8f7a66 100%);
padding: 10px 20px;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
-webkit-box-shadow: rgba(255,255,255,0.4) 0 0px 0, inset rgba(255,255,255,0.4) 0 0px 0;
-moz-box-shadow: rgba(255,255,255,0.4) 0 0px 0, inset rgba(255,255,255,0.4) 0 0px 0;
box-shadow: rgba(255,255,255,0.4) 0 0px 0, inset rgba(255,255,255,0.4) 0 0px 0;
color: #ffffff;
text-decoration: none;
vertical-align: middle;
}
.tversion-button {
border: 2px solid #8f7a66;
background: #8f7a66;
background: -webkit-gradient(linear, left top, left bottom, from(#8f7a66), to(#8f7a66));
background: -webkit-linear-gradient(top, #8f7a66, #8f7a66);
background: -moz-linear-gradient(top, #8f7a66, #8f7a66);
background: -ms-linear-gradient(top, #8f7a66, #8f7a66);
background: -o-linear-gradient(top, #8f7a66, #8f7a66);
background-image: -ms-linear-gradient(top, #8f7a66 0%, #8f7a66 100%);
padding: 10px 20px;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
-webkit-box-shadow: rgba(255,255,255,0.4) 0 0px 0, inset rgba(255,255,255,0.4) 0 0px 0;
-moz-box-shadow: rgba(255,255,255,0.4) 0 0px 0, inset rgba(255,255,255,0.4) 0 0px 0;
box-shadow: rgba(255,255,255,0.4) 0 0px 0, inset rgba(255,255,255,0.4) 0 0px 0;
color: #ffffff;
text-decoration: none;
vertical-align: right;
}
<div class="fl1">
2048
</div>
<div class="fl2">
16384
</div>
<div class="fl3">
65536
</div>
add display:inline-block; for tag a and set all buttons to float:left
a{
display:inline-block;
}
.fversion-button {
border: 2px solid #8f7a66;
background: #8f7a66;
background: -webkit-gradient(linear, left top, left bottom, from(#8f7a66), to(#8f7a66));
background: -webkit-linear-gradient(top, #8f7a66, #8f7a66);
background: -moz-linear-gradient(top, #8f7a66, #8f7a66);
background: -ms-linear-gradient(top, #8f7a66, #8f7a66);
background: -o-linear-gradient(top, #8f7a66, #8f7a66);
background-image: -ms-linear-gradient(top, #8f7a66 0%, #8f7a66 100%);
padding: 10px 20px;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
-webkit-box-shadow: rgba(255,255,255,0.4) 0 0px 0, inset rgba(255,255,255,0.4) 0 0px 0;
-moz-box-shadow: rgba(255,255,255,0.4) 0 0px 0, inset rgba(255,255,255,0.4) 0 0px 0;
box-shadow: rgba(255,255,255,0.4) 0 0px 0, inset rgba(255,255,255,0.4) 0 0px 0;
color: #ffffff;
text-decoration: none;
vertical-align: left;
float: left;
}
.sversion-button {
border: 2px solid #8f7a66;
background: #8f7a66;
background: -webkit-gradient(linear, left top, left bottom, from(#8f7a66), to(#8f7a66));
background: -webkit-linear-gradient(top, #8f7a66, #8f7a66);
background: -moz-linear-gradient(top, #8f7a66, #8f7a66);
background: -ms-linear-gradient(top, #8f7a66, #8f7a66);
background: -o-linear-gradient(top, #8f7a66, #8f7a66);
background-image: -ms-linear-gradient(top, #8f7a66 0%, #8f7a66 100%);
padding: 10px 20px;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
-webkit-box-shadow: rgba(255,255,255,0.4) 0 0px 0, inset rgba(255,255,255,0.4) 0 0px 0;
-moz-box-shadow: rgba(255,255,255,0.4) 0 0px 0, inset rgba(255,255,255,0.4) 0 0px 0;
box-shadow: rgba(255,255,255,0.4) 0 0px 0, inset rgba(255,255,255,0.4) 0 0px 0;
color: #ffffff;
text-decoration: none;
vertical-align: middle;
float: left;
}
.tversion-button {
border: 2px solid #8f7a66;
background: #8f7a66;
background: -webkit-gradient(linear, left top, left bottom, from(#8f7a66), to(#8f7a66));
background: -webkit-linear-gradient(top, #8f7a66, #8f7a66);
background: -moz-linear-gradient(top, #8f7a66, #8f7a66);
background: -ms-linear-gradient(top, #8f7a66, #8f7a66);
background: -o-linear-gradient(top, #8f7a66, #8f7a66);
background-image: -ms-linear-gradient(top, #8f7a66 0%, #8f7a66 100%);
padding: 10px 20px;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
-webkit-box-shadow: rgba(255,255,255,0.4) 0 0px 0, inset rgba(255,255,255,0.4) 0 0px 0;
-moz-box-shadow: rgba(255,255,255,0.4) 0 0px 0, inset rgba(255,255,255,0.4) 0 0px 0;
box-shadow: rgba(255,255,255,0.4) 0 0px 0, inset rgba(255,255,255,0.4) 0 0px 0;
color: #ffffff;
text-decoration: none;
vertical-align: right;
float: left;
}
2048
16384
65536
/* Replace all css with this one css for all buttons */
.demo_btn {
border: 2px solid #8f7a66;
background: #8f7a66;
background: -webkit-gradient(linear, left top, left bottom, from(#8f7a66), to(#8f7a66));
background: -webkit-linear-gradient(top, #8f7a66, #8f7a66);
background: -moz-linear-gradient(top, #8f7a66, #8f7a66);
background: -ms-linear-gradient(top, #8f7a66, #8f7a66);
background: -o-linear-gradient(top, #8f7a66, #8f7a66);
background-image: -ms-linear-gradient(top, #8f7a66 0%, #8f7a66 100%);
padding: 10px 20px;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
-webkit-box-shadow: rgba(255,255,255,0.4) 0 0px 0, inset rgba(255,255,255,0.4) 0 0px 0;
-moz-box-shadow: rgba(255,255,255,0.4) 0 0px 0, inset rgba(255,255,255,0.4) 0 0px 0;
box-shadow: rgba(255,255,255,0.4) 0 0px 0, inset rgba(255,255,255,0.4) 0 0px 0;
color: #ffffff;
text-decoration: none;
vertical-align: middle;
display: inline-block;
}
<!-- Add common class to all buttons -->
2048
16384
65536
I am trying to make a iframe for website demos so I want to add a fixed header. Why does my right Buy Now Button will keep getting lower then it should? I have tried a few things but I am not a coder.
Here is my code:
#headerfix {
height: 60px;
background-color:#000;
border-bottom: 2px solid gold;
z-index: 99999;
position: fixed;
width: 100%;
}
.button {
border: 2px solid gold;
background: #ff9900;
background: -webkit-gradient(linear, left top, left bottom, from(#ffff00), to(#ff9900));
background: -webkit-linear-gradient(top, #ffff00, #ff9900);
background: -moz-linear-gradient(top, #ffff00, #ff9900);
background: -ms-linear-gradient(top, #ffff00, #ff9900);
background: -o-linear-gradient(top, #ffff00, #ff9900);
background-image: -ms-linear-gradient(top, #ffff00 0%, #ff9900 100%);
padding: 7.5px 15px;
-webkit-border-radius: 6px;
-moz-border-radius: 6px;
border-radius: 6px;
-webkit-box-shadow: rgba(255,255,255,0.4) 0 1px 0, inset rgba(255,255,255,0.4) 0 1px 0;
-moz-box-shadow: rgba(255,255,255,0.4) 0 1px 0, inset rgba(255,255,255,0.4) 0 1px 0;
box-shadow: rgba(255,255,255,0.4) 0 1px 0, inset rgba(255,255,255,0.4) 0 1px 0;
text-shadow: #303030 0 1px 0;
color: #000000;
font-size: 18px;
font-family: helvetica, serif;
text-decoration: none;
vertical-align: middle;
}
.button:hover {
border: 2px solid #d9ff00;
text-shadow: #1e4158 0 1px 0;
background: #ffff00;
background: -webkit-gradient(linear, left top, left bottom, from(#ff9900), to(#ffff00));
background: -webkit-linear-gradient(top, #ff9900, #ffff00);
background: -moz-linear-gradient(top, #ff9900, #ffff00);
background: -ms-linear-gradient(top, #ff9900, #ffff00);
background: -o-linear-gradient(top, #ff9900, #ffff00);
background-image: -ms-linear-gradient(top, #ff9900 0%, #ffff00 100%);
color: #fff;
}
.button:active {
text-shadow: #1e4158 0 1px 0;
border: 2px solid #d9ff00;
background: #ff9900;
background: -webkit-gradient(linear, left top, left bottom, from(#ffff00), to(#ffff00));
background: -webkit-linear-gradient(top, #ffff00, #ff9900);
background: -moz-linear-gradient(top, #ffff00, #ff9900);
background: -ms-linear-gradient(top, #ffff00, #ff9900);
background: -o-linear-gradient(top, #ffff00, #ff9900);
background-image: -ms-linear-gradient(top, #ffff00 0%, #ff9900 100%);
color: #000000;
}
#preview-frame {
margin: 0 auto;
display: block;
padding-top: 60px;
width:100%;
height: 581px;
}
<div id="headerfix">
<section style="width:15%; float:left;"><img style='padding-left: 10px; padding-top: 2.5px;' src="https://turnkey-shop.com/wp-content/uploads/2017/11/demo-tunkey-icon.png" alt="Turnkey-Shop.com"></section>
<section style='padding-left:15%; padding-top:8px; width:70%; text-align:center; float:none; font-size:25px; color:gold;'>Product Name</section>
<section style='padding-left:15%; width:70%; text-align:center; float:none; font-size:12px; color:gold;'>SKU</section>
<section style='padding-left:85%; width: 15%; float:none; '><a href='https://turnkey-shop.com/' class='button'>Buy Now</a></section>
</div>
<iframe id="preview-frame" src="https://turnkey-shop.com/" frameborder="0"></iframe>
I want my button to be center in the top bar.
Use margin-top property in the section to properly align your button
Fiddle: http://jsfiddle.net/sanchitpatiyal95/QQKc4/184/
I have to color 50% of the progress bar with red color. Here is what I have tried , my css and html:
.progress {
width:100%;
display: inline-block;
height: 0.4615384615384615em;
padding: 0.0769230769230769em;
background: #fff;
border: 1px solid #c0c0c0;
position: relative;
-webkit-border-radius: 5px 5px 5px 5px;
-moz-border-radius: 5px 5px 5px 5px;
border-radius: 5px 5px 5px 5px;
background: #f9f9f9;
background: -moz-linear-gradient(top, #ffffff 0, #f2f2f2 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #ffffff), color-stop(100%, #f2f2f2));
background: -webkit-linear-gradient(top, #ffffff 0, #f2f2f2 100%);
background: -o-linear-gradient(top, #ffffff 0, #f2f2f2 100%);
background: -ms-linear-gradient(top, #ffffff 0, #f2f2f2 100%);
background: linear-gradient(to bottom, #ffffff 0, #f2f2f2 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffffff, endColorstr=#f2f2f2, GradientType=0);
filter: none \9;
}
.progress.complete {
height: 0.9em;
position: relative;
}
<div id="id1" class="progress complete">
<span title="" style="background: red; left: 0%; width: 50%; box-shadow: 0px 2px 1px rgba(0,0,0,0.2), inset 0px 2px 1px rgba(0,0,0,0.2);" rel="tooltip"></span>
</div>
How to color it without adding any text to <span> element in the output?
You have forgot to mention height & position to span tag
.progress {
width:100%;
display: inline-block;
height: 0.4615384615384615em;
padding: 0.0769230769230769em;
background: #fff;
border: 1px solid #c0c0c0;
position: relative;
-webkit-border-radius: 5px 5px 5px 5px;
-moz-border-radius: 5px 5px 5px 5px;
border-radius: 5px 5px 5px 5px;
background: #f9f9f9;
background: -moz-linear-gradient(top, #ffffff 0, #f2f2f2 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #ffffff), color-stop(100%, #f2f2f2));
background: -webkit-linear-gradient(top, #ffffff 0, #f2f2f2 100%);
background: -o-linear-gradient(top, #ffffff 0, #f2f2f2 100%);
background: -ms-linear-gradient(top, #ffffff 0, #f2f2f2 100%);
background: linear-gradient(to bottom, #ffffff 0, #f2f2f2 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffffff, endColorstr=#f2f2f2, GradientType=0);
filter: none \9;
}
.progress.complete {
height: 0.9em;
position: relative;
}
<div id="id1" class="progress complete">
<span title="" style="background: red; left: 0%; width: 50%; box-shadow: 0px 2px 1px rgba(0,0,0,0.2), inset 0px 2px 1px rgba(0,0,0,0.2);height: 100%; position: absolute;top: 0;" rel="tooltip"></span>
</div>
If you want to do that without span tag then use pseudo selector ::after as below to style that,
.progress {
width:100%;
display: inline-block;
height: 0.4615384615384615em;
padding: 0.0769230769230769em;
background: #fff;
border: 1px solid #c0c0c0;
position: relative;
-webkit-border-radius: 5px 5px 5px 5px;
-moz-border-radius: 5px 5px 5px 5px;
border-radius: 5px 5px 5px 5px;
background: #f9f9f9;
background: -moz-linear-gradient(top, #ffffff 0, #f2f2f2 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #ffffff), color-stop(100%, #f2f2f2));
background: -webkit-linear-gradient(top, #ffffff 0, #f2f2f2 100%);
background: -o-linear-gradient(top, #ffffff 0, #f2f2f2 100%);
background: -ms-linear-gradient(top, #ffffff 0, #f2f2f2 100%);
background: linear-gradient(to bottom, #ffffff 0, #f2f2f2 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffffff, endColorstr=#f2f2f2, GradientType=0);
filter: none \9;
overflow:hidden;
}
.progress:after{
content:'';
position:absolute;
background: red;
left: 0%;
top:0;
width: 50%;
height:10px;
box-shadow: 0px 2px 1px rgba(0,0,0,0.2), inset 0px 2px 1px rgba(0,0,0,0.2);
z-index:9;
-webkit-border-radius: 5px 5px 5px 5px;
-moz-border-radius: 5px 5px 5px 5px;
border-radius: 5px 5px 5px 5px;
}
<div id="id1" class="progress complete">
</div>
Span tag default display is inline so you need to change that to inline-block and height to it.
.progress {
width: 100%;
display: inline-block;
height: 0.4615384615384615em;
padding: 0.0769230769230769em;
background: #fff;
border: 1px solid #c0c0c0;
position: relative;
-webkit-border-radius: 5px 5px 5px 5px;
-moz-border-radius: 5px 5px 5px 5px;
border-radius: 5px 5px 5px 5px;
background: #f9f9f9;
background: -moz-linear-gradient(top, #ffffff 0, #f2f2f2 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #ffffff), color-stop(100%, #f2f2f2));
background: -webkit-linear-gradient(top, #ffffff 0, #f2f2f2 100%);
background: -o-linear-gradient(top, #ffffff 0, #f2f2f2 100%);
background: -ms-linear-gradient(top, #ffffff 0, #f2f2f2 100%);
background: linear-gradient(to bottom, #ffffff 0, #f2f2f2 100%);
filter: progid: DXImageTransform.Microsoft.gradient(startColorstr=#ffffff, endColorstr=#f2f2f2, GradientType=0);
filter: none \9;
overflow: hidden;
}
.progress.complete {
height: 0.9em;
position: relative;
}
span {
background: red;
left: 0%;
width: 50%;
height: 15px;
display: block;
-webkit-border-radius: 5px 5px 5px 5px;
-moz-border-radius: 5px 5px 5px 5px;
border-radius: 5px 5px 5px 5px;
box-shadow: 0px 2px 1px rgba(0, 0, 0, 0.2), inset 0px 2px 1px rgba(0, 0, 0, 0.2);
}
<div id="id1" class="progress complete">
<span title="progress bar" rel="tooltip"></span>
</div>
I am using some css styled checkboxes and want to have a parent container (I am using a div) to scroll when they overflow a certain height. I am currently using this:
/**
* Menu Styles
*/
.fieldset-auto-width {
display: inline-block;
}
.menu_header
{
vertical-align:middle;
background-color:#d0eace;
padding-top:24px;
padding-bottom:24px;
padding-left:24px;
padding-right:24px;
width:500px;
}
.menu_button
{
padding-top:12px;
padding-left:8px;
width:50px;
vertical-align:middle;
}
.menu_description
{
padding-top:12px;
padding-left:8px;
padding-right:8px;
width:400px;
}
.created_by
{
display:inline-block;
float:right;
}
input,.container
{
background-color:white;
}
select
{
color: #000;
font-size: 12px;
background: transparent;
/*-webkit-appearance: none;*/
}
button, option {
background-color: white;/*#d0eace;*/
}
input[type=radio] {
visibility: hidden;
}
/**
* frnakRadio Buttons!
*/
.frnakRadio {
width: 24px;
height: 24px;
background: #ddd;
margin: 10px 10px;
border-radius: 100%;
position: absolute;
-webkit-box-shadow: 0px 1px 3px rgba(0,0,0,0.5);
-moz-box-shadow: 0px 1px 3px rgba(0,0,0,0.5);
box-shadow: 0px 1px 3px rgba(0,0,0,0.5);
}
/**
* Create the checkbox button
*/
.frnakRadio label {
display: inline-block;
width: 18px;
height: 18px;
border-radius: 100px;
-webkit-transition: all .5s ease;
-moz-transition: all .5s ease;
-o-transition: all .5s ease;
-ms-transition: all .5s ease;
transition: all .5s ease;
cursor: pointer;
position: relative;
top: 3px;
left: 3px;
z-index: 1;
background: #333;
-webkit-box-shadow:inset 0px 1px 3px rgba(0,0,0,0.5);
-moz-box-shadow:inset 0px 1px 3px rgba(0,0,0,0.5);
box-shadow:inset 0px 1px 3px rgba(0,0,0,0.5);
}
/**
* Create the checked state
*/
.frnakRadio input[type=radio]:checked + label {
background: #26ca28;
}
.checkname
{
display: block;
margin: 10px 35px;
}
input[type=text] {
height:2.2em;
padding:5px 5px;
margin-bottom: 10px ;
border-radius:.75em;
-moz-border-radius:.5em;
-webkit-border-radius:.5em;
text-transform:none;
width:200px;
background:-webkit-gradient(linear, left top, left 25, from(#FFF), color-stop(1%,#FFF), to(#d0eace));
background:-moz-linear-gradient(right, #EEEDEE, #d0eace); /* For Firefox 3.6 to 15 */
color:#000;
font-size:.9em;
}
input[type=text]:focus{
box-shadow:1px 1px 10px #446;
outline:none;
}
.crunch:hover
{
background-color: #d0eace;
font-weight:bold;
}
.centercontainer {
/* Internet Explorer 10 */
display:-ms-flexbox;
-ms-flex-pack:center;
-ms-flex-align:center;
/* Firefox */
display:-moz-box;
-moz-box-pack:center;
-moz-box-align:center;
/* Safari, Opera, and Chrome */
/*display:-webkit-box;
-webkit-box-pack:center;
-webkit-box-align:center;*/
/* W3C */
display:box;
box-pack:center;
box-align:center;
display: inline-block;
}
.status
{
border-radius: 100%;
margin:0px 20px;
border: 1px solid black;
width: 15px;
height: 15px;
float:center;
}
.queued
{
background: yellow;
}
.running
{
background:green;
}
.failed
{
background:red;
}
.key
{
float: left;
width: 15px;
text-align: left;
margin: 2px 2px;
margin-left:25px;
display: inline-block;
}
.keytext
{
width: 80px;
float: left;
text-align: left;
margin: 2px 2px;
display: inline-block;
font-size:14px;
font:Times;
}
.helper {
position: relative;
padding: 5px;
width: 15px; height:15px;
cursor:pointer;
}
#loading-image {
margin:0 auto;
background-color: #c0dabd;
width: 128px;
height: 128px;
z-index: 50;
position:absolute;
left:45%;
top:40%;
margin:-0px 0 0 -0px;
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
border-radius: 10px; /* future proofing */
-khtml-border-radius: 10px;
}
//FRNAKCHECK!!!
input[type=checkbox] {
visibility: hidden;
}
.frnakcheckbox {
width: 24px;
height: 22px;
background: #fcfff4;
background: -webkit-linear-gradient(top, #fcfff4 0%, #dfe5d7 40%, #b3bead 100%);
background: -moz-linear-gradient(top, #fcfff4 0%, #dfe5d7 40%, #b3bead 100%);
background: -o-linear-gradient(top, #fcfff4 0%, #dfe5d7 40%, #b3bead 100%);
background: -ms-linear-gradient(top, #fcfff4 0%, #dfe5d7 40%, #b3bead 100%);
background: linear-gradient(top, #fcfff4 0%, #dfe5d7 40%, #b3bead 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fcfff4', endColorstr='#b3bead',GradientType=0 );
margin: -12px 5px auto;
-webkit-box-shadow: inset 0px 1px 1px white, 0px 1px 3px rgba(0,0,0,0.5);
-moz-box-shadow: inset 0px 1px 1px white, 0px 1px 3px rgba(0,0,0,0.5);
box-shadow: inset 0px 1px 1px white, 0px 1px 3px rgba(0,0,0,0.5);
position: absolute;
}
.frnakcheckbox label {
cursor: pointer;
position: absolute;
width: 20px;
height: 20px;
left: 2px;
top: 0px;
-webkit-box-shadow: inset 0px 1px 1px rgba(0,0,0,0.5), 0px 1px 0px rgba(255,255,255,1);
-moz-box-shadow: inset 0px 1px 1px rgba(0,0,0,0.5), 0px 1px 0px rgba(255,255,255,1);
box-shadow: inset 0px 1px 1px rgba(0,0,0,0.5), 0px 1px 0px rgba(255,255,255,1);
background: -webkit-linear-gradient(top, #222 0%, #45484d 100%);
background: -moz-linear-gradient(top, #222 0%, #45484d 100%);
background: -o-linear-gradient(top, #222 0%, #45484d 100%);
background: -ms-linear-gradient(top, #222 0%, #45484d 100%);
background: linear-gradient(top, #222 0%, #45484d 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#222', endColorstr='#45484d',GradientType=0 );
}
.frnakcheckbox label:after {
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
filter: alpha(opacity=0);
opacity: 0;
content: '';
position: absolute;
width: 16px;
height: 16px;
background: #00bf00;
background: -webkit-linear-gradient(top, #00bf00 0%, #009400 100%);
background: -moz-linear-gradient(top, #00bf00 0%, #009400 100%);
background: -o-linear-gradient(top, #00bf00 0%, #009400 100%);
background: -ms-linear-gradient(top, #00bf00 0%, #009400 100%);
background: linear-gradient(top, #00bf00 0%, #009400 100%);
top: 2px;
left: 2px;
-webkit-box-shadow: inset 0px 1px 1px white, 0px 1px 3px rgba(0,0,0,0.5);
-moz-box-shadow: inset 0px 1px 1px white, 0px 1px 3px rgba(0,0,0,0.5);
box-shadow: inset 0px 1px 1px white, 0px 1px 3px rgba(0,0,0,0.5);
}
.frnakcheckbox label:hover::after {
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=30)";
filter: alpha(opacity=30);
opacity: 0.3;
}
.frnakcheckbox input[type=checkbox]:disabled{
background: #FFFFFF;
background: -webkit-linear-gradient(top, #ffffff 0%, #009400 100%);
background: -moz-linear-gradient(top, #ffffff 0%, #009400 100%);
background: -o-linear-gradient(top, #ffffff 0%, #009400 100%);
background: -ms-linear-gradient(top, #ffffff 0%, #009400 100%);
background: linear-gradient(top, #ffffff 0%, #009400 100%);
}
.frnakcheckbox input[type=checkbox]:checked + label:after {
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
filter: alpha(opacity=100);
opacity: 1;
}
.checklabel {
margin: -10px 40px auto;
}
<div id="" style="overflow:auto; height:300px; display: inline-block;">
<b>Sample Text:</b><span class="helper" id="help1" style="color:blue;"><b>?</b></span>
<br>
<br>
<br>
<div class="fcheckbox">
<input type="checkbox" value="library_522">
<label for="control522"></label>
</div>
<div class="checklabel">522</div>
<br>
<div class="fcheckbox">
<input type="checkbox" value="library_523">
<label for="control523"></label>
</div>
<div class="checklabel">523</div>
<br>
</div>
This ends up looking like this: http://imgur.com/EPZ3SnQ
Notice that the actual check boxes aren't contained by the div but the labels are!
This is the CSS for the radio buttons: http://pastebin.com/up29LWCD
I am new to css and haven't quite gotten to understand how positioning works. Any help would be appreciated! I have tried a varying combination of style tags with no real progress...
They seem to work fine if you use them in a container and set the overflow?
/**
* Menu Styles
*/
.container {
margin: 10px;
border: 1px solid black;
height: 100px;
width: 100px;
overflow-y: scroll;
}
/**
* FRNAKCHECK
*/
.frnakcheckbox {
width: 24px;
height: 22px;
background: #fcfff4;
background: -webkit-linear-gradient(top, #fcfff4 0%, #dfe5d7 40%, #b3bead 100%);
background: -moz-linear-gradient(top, #fcfff4 0%, #dfe5d7 40%, #b3bead 100%);
background: -o-linear-gradient(top, #fcfff4 0%, #dfe5d7 40%, #b3bead 100%);
background: -ms-linear-gradient(top, #fcfff4 0%, #dfe5d7 40%, #b3bead 100%);
background: linear-gradient(top, #fcfff4 0%, #dfe5d7 40%, #b3bead 100%);
filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#fcfff4', endColorstr='#b3bead', GradientType=0);
margin: -12px 5px auto;
-webkit-box-shadow: inset 0px 1px 1px white, 0px 1px 3px rgba(0, 0, 0, 0.5);
-moz-box-shadow: inset 0px 1px 1px white, 0px 1px 3px rgba(0, 0, 0, 0.5);
box-shadow: inset 0px 1px 1px white, 0px 1px 3px rgba(0, 0, 0, 0.5);
position: absolute;
}
.frnakcheckbox label {
cursor: pointer;
position: absolute;
width: 20px;
height: 20px;
left: 2px;
top: 0px;
-webkit-box-shadow: inset 0px 1px 1px rgba(0, 0, 0, 0.5), 0px 1px 0px rgba(255, 255, 255, 1);
-moz-box-shadow: inset 0px 1px 1px rgba(0, 0, 0, 0.5), 0px 1px 0px rgba(255, 255, 255, 1);
box-shadow: inset 0px 1px 1px rgba(0, 0, 0, 0.5), 0px 1px 0px rgba(255, 255, 255, 1);
background: -webkit-linear-gradient(top, #222 0%, #45484d 100%);
background: -moz-linear-gradient(top, #222 0%, #45484d 100%);
background: -o-linear-gradient(top, #222 0%, #45484d 100%);
background: -ms-linear-gradient(top, #222 0%, #45484d 100%);
background: linear-gradient(top, #222 0%, #45484d 100%);
filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#222', endColorstr='#45484d', GradientType=0);
}
.frnakcheckbox label:after {
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
filter: alpha(opacity=0);
opacity: 0;
content: '';
position: absolute;
width: 16px;
height: 16px;
background: #00bf00;
background: -webkit-linear-gradient(top, #00bf00 0%, #009400 100%);
background: -moz-linear-gradient(top, #00bf00 0%, #009400 100%);
background: -o-linear-gradient(top, #00bf00 0%, #009400 100%);
background: -ms-linear-gradient(top, #00bf00 0%, #009400 100%);
background: linear-gradient(top, #00bf00 0%, #009400 100%);
top: 2px;
left: 2px;
-webkit-box-shadow: inset 0px 1px 1px white, 0px 1px 3px rgba(0, 0, 0, 0.5);
-moz-box-shadow: inset 0px 1px 1px white, 0px 1px 3px rgba(0, 0, 0, 0.5);
box-shadow: inset 0px 1px 1px white, 0px 1px 3px rgba(0, 0, 0, 0.5);
}
.frnakcheckbox label:hover::after {
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=30)";
filter: alpha(opacity=30);
opacity: 0.3;
}
.frnakcheckbox input[type=checkbox]:disabled {
background: #FFFFFF;
background: -webkit-linear-gradient(top, #ffffff 0%, #009400 100%);
background: -moz-linear-gradient(top, #ffffff 0%, #009400 100%);
background: -o-linear-gradient(top, #ffffff 0%, #009400 100%);
background: -ms-linear-gradient(top, #ffffff 0%, #009400 100%);
background: linear-gradient(top, #ffffff 0%, #009400 100%);
}
.frnakcheckbox input[type=checkbox]:checked + label:after {
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
filter: alpha(opacity=100);
opacity: 1;
}
.checklabel {
margin: -10px 40px auto;
}
<b>Sample Text:</b>
<span class="helper" id="help1" style="color:blue;"><b>?</b></span>
<div class="container">
<div class="fcheckbox">
<input type="checkbox" value="library_522">
<label for="control522">522</label>
</div>
<br>
<div class="fcheckbox">
<input type="checkbox" value="library_523">
<label for="control523">523</label>
</div>
<div class="fcheckbox">
<input type="checkbox" value="library_522">
<label for="control522">522</label>
</div>
<br>
<div class="fcheckbox">
<input type="checkbox" value="library_523">
<label for="control523">523</label>
</div>
<div class="fcheckbox">
<input type="checkbox" value="library_522">
<label for="control522">522</label>
</div>
<br>
<div class="fcheckbox">
<input type="checkbox" value="library_523">
<label for="control523">523</label>
</div>
<div class="fcheckbox">
<input type="checkbox" value="library_522">
<label for="control522">522</label>
</div>
<br>
<div class="fcheckbox">
<input type="checkbox" value="library_523">
<label for="control523">523</label>
</div>
<br>
</div>
Here is the link to my site. When you have a wide resolution there is no issue with the dispaly, but if with the brower I try to simulate a little resolution, I come across an issue :
The nav bar won't fill the entire page but only the width of the browser, even though I used width : 100%;
Here the code in CSS
header {
width: 100%;
/*min-width: 1000px;*/
-webkit-box-shadow: 0px 1px 1px 0px rgba(250, 250, 250, .5);
-moz-box-shadow: 0px 1px 1px 0px rgba(250, 250, 250, .5);
box-shadow: 0px 1px 1px 0px rgba(250, 250, 250, .5);
padding-top: 60px; /* Gere l'espace entre le top et la barre de menu */
background: url('../img/binding_dark.png');
}
nav {
margin-bottom: 30px;
width: 100%;
background: -moz-linear-gradient(top, #353535 0%, #222222 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#353535), color-stop(100%,#222222));
background: -webkit-linear-gradient(top, #353535 0%,#222222 100%);
background: -o-linear-gradient(top, #353535 0%,#222222 100%);
background: -ms-linear-gradient(top, #353535 0%,#222222 100%);
background: linear-gradient(top, #353535 0%,#222222 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#353535', endColorstr='#222222',GradientType=0 );
border-width: 1px 0 1px 0;
border-style: solid;
border-color: #000;
}
The header is the wide black block and the nav is inside it.
Here is an exemple of the issue:
The header won't fill all the page (horizontally), the li element would overflow, and gradient background would split.
Is there a solution to this please ?
Here is your corrected css and fiddle link
header {
width: 100%;
-webkit-box-shadow: 0px 1px 1px 0px rgba(250, 250, 250, .5);
-moz-box-shadow: 0px 1px 1px 0px rgba(250, 250, 250, .5);
box-shadow: 0px 1px 1px 0px rgba(250, 250, 250, .5);
padding-top: 60px; /* Gere l'espace entre le top et la barre de menu */
background: url('../img/binding_dark.png');
}
hgroup,
main,
nav {
margin-bottom: 30px;
width: 100%;
background: -moz-linear-gradient(top, #353535 0%, #222222 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#353535), color-stop(100%,#222222));
background: -webkit-linear-gradient(top, #353535 0%,#222222 100%);
background: -o-linear-gradient(top, #353535 0%,#222222 100%);
background: -ms-linear-gradient(top, #353535 0%,#222222 100%);
background: linear-gradient(top, #353535 0%,#222222 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#353535', endColorstr='#222222',GradientType=0 );
border-top:1px solid #000;
border-bottom:1px solid #000;
}
/* nav:before {
border-top: 1px solid #444;
}
nav:after {
border-top: 1px solid #333;
}*/
nav ul {
/*width: 808px;*/
height: 45px;
margin: 0 auto;
/*border-left: 1px solid #111;
border-right: 1px solid #444;*/
}
nav li {
float: left;
list-style-type:none;
}
nav li a {
display: inline-block;
/*width: 200px;*/
width:auto;
padding:0 50px;
height: 45px;
font: bold 15px 'Arial', sans-serif;
color: #fff;
text-decoration: none;
text-align: center;
line-height: 48px;
text-shadow: 1px 1px 0px #111;
filter: dropshadow(color=#111, offx=1, offy=1);
border-left: 1px solid #444;
border-right: 1px solid #111;
background-color:#2B2B2B;
}
nav li a:hover {
background: -moz-linear-gradient(top, #444 0%, #222 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#444), color-stop(100%,#222));
background: -webkit-linear-gradient(top, #444 0%,#222 100%);
background: -o-linear-gradient(top, #444 0%,#222 100%);
background: -ms-linear-gradient(top, #444 0%,#222 100%);
background: linear-gradient(top, #444 0%,#222 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#444', endColorstr='#222',GradientType=0 );
/*background-color:#2F2F2F;*/
}
nav li a:active {
background: #222;
-webkit-box-shadow: inset 0px 0px 3px 1px rgba(0, 0, 0, .3);
-moz-box-shadow: inset 0px 0px 3px 1px rgba(0, 0, 0, .3);
box-shadow: inset 0px 0px 3px 1px rgba(0, 0, 0, .3);
}
nav li a:active:after {
content: "";
display: block;
width: 100%;
height: 4px;
position: relative;
bottom: 6px;
background: -moz-linear-gradient(top, #ff5e1f 0%, #ff3410 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ff5e1f), color-stop(100%,#ff3410));
background: -webkit-linear-gradient(top, #ff5e1f 0%,#ff3410 100%);
background: -o-linear-gradient(top, #ff5e1f 0%,#ff3410 100%);
background: -ms-linear-gradient(top, #ff5e1f 0%,#ff3410 100%);
background: linear-gradient(top, #ff5e1f 0%,#ff3410 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ff5e1f', endColorstr='#ff3410',GradientType=0 );
}
There are other issues with the layout, but for the immediate problem, you could try
#page-wrap header {min-width: 1400px;}
Try increasing the width of the nav ul.
nav ul {
width: 809px;
height: 45px;
margin: 0 auto;
border-left: 1px solid #111;
border-right: 1px solid #444;
}
You can use Developer Tools(F12) to inspect elements.
Check this .