I have issue with my submit button. It is one pixel lower than txt input, but only in Safari. Chrome and Firefox are just fine.
input[type=text] {
height: 45px;
width: 238px;
padding: 0;
background-color: #ebebeb;
border: 1px solid #cecece;
border-radius: 0;
border-bottom-left-radius: 5px;
border-top-left-radius: 5px;
-webkit-box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.2) inset;
-moz-box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.2) inset;
box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.2) inset;
color: #999999;
font-size: 16px;
font-family: 'Noticia Text', serif;
padding-left: 20px;
}
input[type=text]:focus {
outline: 0;
}
#subscribe {
padding: 0;
margin: 0;
background: #3eb0ef;
background: -moz-linear-gradient(top, #3eb0ef 0%, #1b8dd4 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#3eb0ef), color-stop(100%,#1b8dd4));
background: -webkit-linear-gradient(top, #3eb0ef 0%,#1b8dd4 100%);
background: -o-linear-gradient(top, #3eb0ef 0%,#1b8dd4 100%);
background: -ms-linear-gradient(top, #3eb0ef 0%,#1b8dd4 100%);
background: linear-gradient(to bottom, #3eb0ef 0%,#1b8dd4 100%);
-webkit-box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.2);
-moz-box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.2);
box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.2);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#3eb0ef', endColorstr='#1b8dd4',GradientType=0 );
border-radius: 0;
border-top-right-radius: 5px;
border-bottom-right-radius: 5px;
border: 1px solid #1082c8;
height: 47px;
width: 107px;
font-family: 'Noticia Text', serif;
font-size: 16px;
color: white;
text-shadow: 0px 1px 2px rgba(0, 0, 0, 0.3);
}
and HTML:
<form name="subscription" method="post">
<input name="email" id="email" type="text" placeholder="Enter your email address"><input name="subscribe" id="subscribe" value="Notify me" type="submit">
</form>
http://jsfiddle.net/SV3VS/
Does this help?
http://jsfiddle.net/panchroma/ERhLP/
I could see the blip on Safari as well so I tried explicitly setting the height of the input box and the submit button and changed them to an even number.
input#email{
height:48px;
}
#subscribe {
....
height: 48px;
....
}
Good luck!
Related
I have a button with a function that adds selectboxes to the page. I have a H1 with some text, a button, and boxes that are added above the button. I want the button the be right under the H1, but when I add selectboxes it will be pushed down.
This is what is currently happening, the button follows the select-boxes:
CSS
#interesses select{
background-image: -webkit-linear-gradient(top, #fefefe, #eeeeee);
background-image: -moz-linear-gradient(top, #fefefe, #eeeeee);
background-image: -o-linear-gradient(top, #fefefe, #eeeeee);
background-image: linear-gradient(to bottom, #fefefe, #eeeeee);
-webkit-box-shadow: inset 0 -1px rgba(0, 0, 0, 0.03), 0 1px rgba(0, 0, 0, 0.04);
box-shadow: inset 0 -1px rgba(0, 0, 0, 0.03), 0 1px rgba(0, 0, 0, 0.04);
border: 1px solid;
border-color: #d8d8d8 #d1d1d1 #c3c3c3;
border-radius: 1%;
width:30%;
margin-right: 2%;
margin-bottom: 15px;
padding: 0%;
font-size: 18px;
float: left;
font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;
font-weight: 300;
line-height: 1.5;
height: 38px;
-webkit-appearance: none;
}
#interesses-option{
float:left;
display: block;
position:inline;
margin-bottom: 25px;
}
.wide-button-thin{
width: 30%;
height: 40px;
margin-top: 25px;
margin-bottom: 20px;
font-size: 18px;
font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;
font-weight: 300;
color: #494d59;
text-align: center;
text-shadow: 0 1px rgba(255, 255, 255, 0.5);
border: 1px solid;
border-color: #d8d8d8 #d1d1d1 #c3c3c3;
border-radius: 2px;
cursor: pointer;
background-image: -webkit-linear-gradient(top, #fefefe, #eeeeee);
background-image: -moz-linear-gradient(top, #fefefe, #eeeeee);
background-image: -o-linear-gradient(top, #fefefe, #eeeeee);
background-image: linear-gradient(to bottom, #fefefe, #eeeeee);
-webkit-box-shadow: inset 0 -1px rgba(0, 0, 0, 0.03), 0 1px rgba(0, 0, 0, 0.04);
box-shadow: inset 0 -1px rgba(0, 0, 0, 0.03), 0 1px rgba(0, 0, 0, 0.04);
}
It works if I insert two <br> before the button, but I didn't get it to work with margin-top. Any suggestions what I could try?
EDIT:
Here are jsfiddle: http://jsfiddle.net/DWtPt/
To fix this, you should only move the button code above the interesser id like this:
<div id="velg-interesse">
<h2>Legg til interessene dine under:</h2>
<input type="button" class="wide-button-thin" id="leggtilInteresse" value="Legg til interesse">
<div id="interesser"></div>
</div>
I was trying to set the style of a button in my page: http://onlinehandytools.com/blah.php?board=EDE&level=AL&subject=biology&year=2010# (click on any QP or MS link) but chrome is overriding it or something I don't know, It's crossing out my css everything is in thic picture: http://s10.postimg.org/5v8htii4p/Untitled.png
This is the code that should be applied on the button but it wasn't
.button {
-webkit-box-shadow: inset 0px 1px 0px rgba(255, 255, 255, 0.5), 0px 1px 2px rgba(0, 0, 0, 0.15);
-moz-box-shadow: inset 0px 1px 0px rgba(255, 255, 255, 0.5), 0px 1px 2px rgba(0, 0, 0, 0.15);
box-shadow: inset 0px 1px 0px rgba(255, 255, 255, 0.5), 0px 1px 2px rgba(0, 0, 0, 0.15);
background-color: #eeeeee;
background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #fbfbfb), color- stop(100%, #e1e1e1));
background: -webkit-linear-gradient(top, #fbfbfb, #e1e1e1);
background: -moz-linear-gradient(top, #fbfbfb, #e1e1e1);
background: -o-linear-gradient(top, #fbfbfb, #e1e1e1);
background: linear-gradient(top, #fbfbfb, #e1e1e1);
display: -moz-inline-stack;
display: inline-block;
vertical-align: middle;
*vertical-align: auto;
zoom: 1;
*display: inline;
border: 1px solid #d4d4d4;
height: 32px;
line-height: 32px;
padding: 0px 25.6px;
font-weight: 300;
font-size: 14px;
font-family: "Helvetica Neue Light", "Helvetica Neue", "Helvetica", "Arial", "Lucida Grande", sans-serif;
color: #666666;
text-shadow: 0 1px 1px white;
margin: 0;
text-decoration: none;
text-align: center; }
So I made a form and added styling with CSS, it looks fine on windows but when I go to the form with my Mac it looks diffrent, everything is smaller and has changed color.
Why is OS X changing my CSS?
And is there a way to fix this problem?
Image of problem: http://i.tinyuploads.com/zq3rtp.png
This problem happens in every browser on my Mac
HTML Code:
<p>Name:<span class="Req-ourForm">*</span></p> <input type="text" required="required" name="name">
<br /><br />
<p>Email:<span class="Req-ourForm">*</span></p> <input type="text" required="required" name="email">
<br /><br />
<p>Website:<span class="Req-ourForm">*</span></p> <input type="text" required="required" name="website">
<br /><br />
<p>Priority:<span class="Req-ourForm">*</span></p>
<!--[if !IE]> --> <div class="notIE"> <!-- <![endif]-->
<label />
<select class="pri" name="priority" size="1" required="required">
<option value="Low">Low</option>
<option value="Normal">Normal</option>
<option value="High">High</option>
</select>
<!--[if !IE]> --></div> <!-- <![endif]-->
<br />
CSS Code:
input, textarea {
padding: 9px;
border: solid 1px #C9C9C9;
outline: 0;
font: normal 13px/100% Verdana, Tahoma, sans-serif;
width: 200px;
background: #e2e2e2 url('bg_form.png') left top repeat-x;
background: -webkit-gradient(linear, left top, left 25, from(#FFFFFF), color-stop(4%, #EEEEEE), to(#FFFFFF));
background: -moz-linear-gradient(top, #FFFFFF, #EEEEEE 1px, #FFFFFF 25px);
box-shadow: rgba(0,0,0, 0.1) 0px 0px 8px;
-moz-box-shadow: rgba(0,0,0, 0.1) 0px 0px 8px;
-webkit-box-shadow: rgba(0,0,0, 0.1) 0px 0px 8px;
}
input.sub {
padding: 9px;
border: solid 1px #C9C9C9;
outline: 0;
font: normal 13px/100% Verdana, Tahoma, sans-serif;
width: 300px;
background: #e2e2e2 url('bg_form.png') left top repeat-x;
background: -webkit-gradient(linear, left top, left 25, from(#FFFFFF), color-stop(4%, #EEEEEE), to(#FFFFFF));
background: -moz-linear-gradient(top, #FFFFFF, #EEEEEE 1px, #FFFFFF 25px);
box-shadow: rgba(0,0,0, 0.1) 0px 0px 8px;
-moz-box-shadow: rgba(0,0,0, 0.1) 0px 0px 8px;
-webkit-box-shadow: rgba(0,0,0, 0.1) 0px 0px 8px;
}
input.captcha {
padding: 9px;
border: solid 1px #C9C9C9;
outline: 0;
font: normal 13px/100% Verdana, Tahoma, sans-serif;
width: 45px;
text-align: center;
background: #e2e2e2 url('bg_form.png') left top repeat-x;
background: -webkit-gradient(linear, left top, left 25, from(#FFFFFF), color-stop(4%, #EEEEEE), to(#FFFFFF));
background: -moz-linear-gradient(top, #FFFFFF, #EEEEEE 1px, #FFFFFF 25px);
box-shadow: rgba(0,0,0, 0.1) 0px 0px 8px;
-moz-box-shadow: rgba(0,0,0, 0.1) 0px 0px 8px;
-webkit-box-shadow: rgba(0,0,0, 0.1) 0px 0px 8px;
}
textarea {
margin-top: 4px;
width: 380px;
max-width: 380px;
max-height: 150px;
height: 150px;
line-height: 150%;
}
input:hover, textarea:hover,
input:focus, textarea:focus {
border-color: #b3b3b3;
-webkit-box-shadow: rgba(0, 0, 0, 0.15) 0px 0px 8px;
#include box-shadow(0 0 5px rgba(81, 203, 238, 1));
border: 1px solid rgba(81, 203, 238, 1);
}
.form label {
margin-left: 10px;
color: #999999;
}
.submit input {
width: auto;
padding: 9px 15px;
background: #617798;
border: 0;
font-size: 14px;
color: #C9C9C9;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
}
/*CSS FOR DROP DOWN*/
label {
position: relative;
display: inline-block;
}
select {
display: inline-block;
padding: 4px 3px 5px 5px;
width: 160px;
outline: none;
color: #74646e;
border: 1px solid #C8BFC4;
border-radius: 4px;
box-shadow: inset 1px 1px 2px #ddd8dc;
background-color: #fff;
}
select.pri {
display: inline-block;
padding: 4px 3px 5px 5px;
width: 85px;
outline: none;
color: #74646e;
border: 1px solid #C8BFC4;
border-radius: 4px;
box-shadow: inset 1px 1px 2px #ddd8dc;
background-color: #fff;
}
select.aop {
display: inline-block;
padding: 4px 3px 5px 5px;
width: 60px;
outline: none;
color: #74646e;
border: 1px solid #C8BFC4;
border-radius: 4px;
box-shadow: inset 1px 1px 2px #ddd8dc;
background-color: #fff;
}
select.stu {
display: inline-block;
padding: 4px 3px 5px 5px;
width: 65px;
outline: none;
color: #74646e;
border: 1px solid #C8BFC4;
border-radius: 4px;
box-shadow: inset 1px 1px 2px #ddd8dc;
background-color: #fff;
}
Second issue is that the buttons are for some reason white instead of blue,
IMG: http://i.tinyuploads.com/pW0E24.png
HTML code of buttons:
<button id="continue-link" class="button button rect" type="submit">
<span>
<span class="effect"></span>
<span class="label">
SEND
</span>
</span>
</button>
<button id="continue-link" class="button button rect" type="reset">
<span>
<span class="effect"></span>
<span class="label">
CLEAR ALL
</span>
</span>
</button>
CSS of buttons:
/*BUTTON DESIGN*/
.button {
background-color: transparent;
border: 0 none;
border-collapse: separate;
cursor: pointer;
display: inline-block;
font: 11px/1.5 "Lucida Grande",Helvetica,Arial,Verdana,sans-serif;
overflow: visible;
position: relative;
}
.button > span {
background: url("common/src/store/base/patterns/buttons/css/bg/button_colors.png") repeat-x scroll 0 0 / 8px 22px #224272;
border: 1px solid #224272;
border-radius: 11px 11px 11px 11px;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
color: white;
display: inline-block;
font: 12px/1 "Lucida Grande","Lucida Sans Unicode",Helvetica,Arial,sans-serif;
letter-spacing: 0;
opacity: 1;
padding: 4px 25px;
position: relative;
text-align: center;
transition: opacity 800ms ease 0s;
white-space: nowrap;
word-spacing: 0;
}
.button:-moz-focusring {
outline: 0px dotted;
}
.ns .button, .button.rect {
background: linear-gradient(#37AAEA, #117ED2) repeat scroll 0 0 transparent;
border: 1px solid #1992D9;
border-radius: 4px 4px 4px 4px; /*BUTTON ROUNDNESS*/
box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset;
}
.ns .button:hover, .ns .button:focus, .button.rect:hover, .button.rect:focus {
background: linear-gradient(#2F90D5, #0351B7) repeat scroll 0 0 transparent;
}
.ns .button:active, .ns .button.active, .button.rect:active, .button.rect.active {
box-shadow: 0 1px 0 #FFFFFF, 0 0 9px rgba(0, 0, 0, 0.5) inset;
}
.ns .button > span, .button.rect > span {
background: none repeat scroll 0 center transparent;
border: 0 none;
border-radius: 4px 4px 4px 4px;
box-shadow: none;
color: #FFFFFF;
font-size: 13px;
line-height: 15px;
padding: 4px 20px; /*BUTTON SIZE*/
}
The reason your button is not blue is because you are not declaring a webkit gradient. I had a look at your stylesheet. Add the correct prefix for various browsers as below -
.ns .button, .button.rect {
background: linear-gradient(#37AAEA, #117ED2) repeat scroll 0 0;
background: linear-gradient(#37AAEA, #117ED2) repeat scroll 0 0;
background: -moz-linear-gradient(#37AAEA, #117ED2) repeat scroll 0 0;
background: -webkit-linear-gradient(#37AAEA, #117ED2) repeat scroll 0 0;
background: -o-llinear-gradient(#37AAEA, #117ED2) repeat scroll 0 0;
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#1e5799', endColorstr='#7db9e8',GradientType=0 ); /* IE6-9 */
border: 1px solid #1992D9;
border-radius: 4px 4px 4px 4px; /*BUTTON ROUNDNESS*/
box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset;
-webkit-appearance: none;
}
This ensures your gradient will work on all browsers that support it.
I am trying to have a image on CSS text button. If I increase font-size to 26 px, image appear properly.I want to keep the font-size at 20px but fit image properly.
a.button {
border: 1px solid #979797;
}
a.button.icon {
padding-left: 11px;
}
a.button.icon span{
padding-left: 48px;
background: url(../img/gmail2.png) no-repeat;
}
a.button.icon.chat span {
background-position: 0px -48;
}
a.button {
background-image: -moz-linear-gradient(top, #ffffff, #dbdbdb);
background-image: -webkit-gradient(linear,left top,left bottom,
color-stop(0, #ffffff),color-stop(1, #dbdbdb));
filter: progid:DXImageTransform.Microsoft.gradient
(startColorStr='#ffffff', EndColorStr='#dbdbdb');
-ms-filter: "progid:DXImageTransform.Microsoft.gradient
(startColorStr='#ffffff', EndColorStr='#dbdbdb')";
border: 1px solid #fff;
-moz-box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.4);
-webkit-box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.4);
box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.4);
border-radius: 2px;
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
padding: 5px 5px;
text-decoration: none;
text-shadow: #fff 0 1px 0;
float: left;
margin-right: 15px;
margin-bottom: 15px;
display: block;
color: #597390;
line-height: 38px;
font-size: 20px;
font-weight: bold;
}
What about setting an specific height for a.button.icon span ?
Is there a way to style HTML5's range control? Is it possible to change the color of the line the slider slides on?
Turns out, there is in webkit:
input[type="range"]{
-webkit-appearance:none !important;
}
input[type="range"]::-webkit-slider-thumb{
-webkit-appearance:none !important;
}
You can then add whatever attributes you need to each those selectors. Background, gradient, etc...
Hope that helps!
A full example of css for customization (at this moment for webkit):
input[type="range"]{
background: rgb(94, 30, 30);
width: 130px;
height: 6px;
-webkit-appearance: none;
border-radius: 8px;
-moz-border-radius: 8px;
-webkit-border-radius: 8px;
-webkit-box-shadow: inset 0px 0px 1px 1px rgba(0, 0, 0, 0.9), 0px 1px 1px 0px rgba(255, 255, 255, 0.13);
-moz-box-shadow: inset 0px 0px 1px 1px rgba(0, 0, 0, 0.9), 0px 1px 1px 0px rgba(255, 255, 255, 0.13);
box-shadow: inset 0px 0px 1px 1px rgba(0, 0, 0, 0.9), 0px 1px 1px 0px rgba(255, 255, 255, 0.13);
}
input[type="range"]:hover{
background: rgb(194, 139, 131);
width: 130px;
height: 6px;
-webkit-appearance: none;
border-radius: 8px;
-moz-border-radius: 8px;
-webkit-border-radius: 8px;
-webkit-box-shadow: inset 0px 0px 1px 1px rgba(0, 0, 0, 0.9), 0px 1px 1px 0px rgba(255, 255, 255, 0.13);
-moz-box-shadow: inset 0px 0px 1px 1px rgba(0, 0, 0, 0.9), 0px 1px 1px 0px rgba(255, 255, 255, 0.13);
box-shadow: inset 0px 0px 1px 1px rgba(0, 0, 0, 0.9), 0px 1px 1px 0px rgba(255, 255, 255, 0.13);
}
input[type="range"]::-webkit-slider-thumb{
-webkit-appearance:none !important;
width:25px;
height:15px;
-webkit-appearance: none;
border-radius: 8px;
-moz-border-radius: 8px;
-webkit-border-radius: 8px;
border:1px solid black;
background: #a90329;
background: -moz-linear-gradient(left, #a90329 0%, #8f0222 50%, #6d0019 100%);
background: -webkit-gradient(linear, left top, right top, color-stop(0%,#a90329), color-stop(50%,#8f0222), color-stop(100%,#6d0019));
background: -webkit-linear-gradient(left, #a90329 0%,#8f0222 50%,#6d0019 100%);
background: -o-linear-gradient(left, #a90329 0%,#8f0222 50%,#6d0019 100%);
background: -ms-linear-gradient(left, #a90329 0%,#8f0222 50%,#6d0019 100%);
background: linear-gradient(to right, #a90329 0%,#8f0222 50%,#6d0019 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#a90329', endColorstr='#6d0019',GradientType=1 );
}
input[type="range"]::-webkit-slider-thumb:hover{
-webkit-appearance:none !important;
width:25px;
height:15px;
-webkit-appearance: none;
border-radius: 8px;
-moz-border-radius: 8px;
-webkit-border-radius: 8px;
background-color:rgb(56, 13, 13);
border:1px solid black;
background: -moz-linear-gradient(left, #1d2e38 0%, #2b4254 50%, #2b4254 100%);
background: -webkit-gradient(linear, left top, right top, color-stop(0%,#1d2e38), color-stop(50%,#2b4254), color-stop(100%,#2b4254));
background: -webkit-linear-gradient(left, #1d2e38 0%,#2b4254 50%,#2b4254 100%);
background: -o-linear-gradient(left, #1d2e38 0%,#2b4254 50%,#2b4254 100%);
background: -ms-linear-gradient(left, #1d2e38 0%,#2b4254 50%,#2b4254 100%);
background: linear-gradient(left, #1d2e38 0%,#2b4254 50%,#2b4254 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#1d2e38', endColorstr='#2b4254',GradientType=1 );
}
On the top answer its already described. I just customize it on my way.
Take a look its may help you.
Add below code on CSS:
input:focus{
outline-color: transparent;
}
input[type="range"]{
-webkit-appearance:none;
-moz-apperance:none;
height: 6px;
background-color: #b6b6b6;
outline-color: transparent;
}
input::-webkit-slider-thumb{
-webkit-appearance:none;
-moz-apperance:none;
width:16px;
height:16px;
-webkit-border-radius:10px;
-moz-border-radius:10px;
-ms-border-radius:10px;
-o-border-radius:10px;
border-radius:10px;
background-color: #20b373;
overflow: visible;
}
Live Demo