custom drop down not working IE and Firefox - css

I have a custom img for my dropdown option menu and i tried other browser like Internet Explorer and FireFox...
My Code:
textarea {
background: #9d9d9d;
color: #000000;
width: 90%;
padding: 5px;
border-radius:5px;
-moz-border-radius:5px;
-webkit-border-radius:5px;
}
.styled-select {
width: 88%;
height: 30px;
overflow: hidden;
background: url('../img/down.png') no-repeat right #9d9d9d;
border: 1px solid #ccc;
border-radius:5px;
-moz-border-radius:5px;
-webkit-border-radius:5px;
}
First Img is for Firefox the Second img is for Internet Explorer

For I.E:
select::-ms-expand
{
display: none;
}
For Firefox:
.select
{
-moz-appearance: none;
appearance: none;
text-overflow: '';
}

Related

How to change `select` element for IE? [duplicate]

This question already has answers here:
Remove Select arrow on IE
(3 answers)
Closed 6 years ago.
I saw this answer to render an arrow on select element:
select {
width: 268px;
padding: 5px;
font-size: 16px;
line-height: 1;
border: 0;
border-radius: 5px;
height: 34px;
background: url(http://cdn1.iconfinder.com/data/icons/cc_mono_icon_set/blacks/16x16/br_down.png) no-repeat right #ddd;
-webkit-appearance: none;
background-position-x: 244px;
}
http://jsfiddle.net/qhCsJ/4120/
It works great for Chrome.
For Firefox the -moz-appearance: none; will do the trick.
But for IE I have no idea.
Add this (IE 10 + I guess):
select::-ms-expand {
display: none;
}
credits here: Remove Select arrow on IE
For IE9, wrap your select with a div and use something like this (a image that will be over the original one):
select {
width: 268px;
padding: 5px;
font-size: 16px;
line-height: 1;
border: 0;
border-radius: 5px;
height: 34px;
-webkit-appearance: none;
background-position-x: 244px;
}
select::-ms-expand {
display: none;
}
div {
position:relative;
display:inline-block;
border:solid black 1px;
z-index:0
}
div select {
z-index:1;
}
div:before {
background: url(http://cdn1.iconfinder.com/data/icons/cc_mono_icon_set/blacks/16x16/br_up.png) no-repeat right #ddd;
display:block;
position:absolute;
content:'';
right:6px;
top:5px;
height:1em;
width:1em;
margin:2px;
z-index:5;
}
IE 8 or before you can't.

range styling not correct in Firefox and Internet Explorer

I have created a custom range style, and in Chrome it works but why does it not work in FireFox/Internet Explorer?
Chrome(works fine):
Firefox:
Internet Explorer:
CSS:
div#slider {
width: 100%;
}
div#slider > input[type="range"] {
-webkit-appearance: none !important;
width: 100%;
height: 20px;
background:#201f1f;
border-radius: 4px;
border:1px solid #6e6e6e;
}
div#slider > input[type="range"]::-webkit-slider-thumb {
-webkit-appearance: none !important;
width: 13px;
height: 30px;
background-color: #3c3c3c;
border-radius: 5px;
border:1px solid #6e6e6e;
}
So, I think it`s the -webkit thingy, but where do I find these for IE en Firefox? I have searched on Google (-webkit list), but I find nothing. Also why is does it not have a normal height on IE?
Live demo: http://rgbgenerator.com/dev/
EDIT:
When I have:
div#slider > input[type="range"] {
-webkit-appearance: none !important;
-ms-appearance: none !important;
-moz-appearance: none !important;
-o-appearance: none !important;
appearance:none !important;
width: 100%;
height: 20px;
background:#201f1f;
border-radius: 4px;
border:1px solid #6e6e6e;
}
div#slider > input[type="range"]::-webkit-slider-thumb {
-webkit-appearance: none !important;
width: 13px;
height: 30px;
background-color: #3c3c3c;
border-radius: 5px;
border:1px solid #6e6e6e;
}
div#slider > input[type="range"]::-moz-range-thumb {
-moz-appearance: none !important;
width: 13px;
height: 30px;
background-color: #3c3c3c;
border-radius: 5px;
border:1px solid #6e6e6e;
}
It works on Chrome, but not in FireFox?
Use:
.thing {
-webkit-appearance: value;
-moz-appearance: value;
appearance: value;
}
When you google a word with a '-' before it, google wil search for pages WITHOUT that word. So it's not very strange is google founds nothing ;)
The appearance property is not supported by: IE and Opera.
For more information:
Css tricks appearance
W3Schools documentation and browser support

Double-sized checkbox in Chrome

All browsers except Chrome do display this style:
.my-checkbox {
width: 20px;
height:20px;
color:#fff;
-moz-appearance:none;
-webkit-appearance:none;
-o-appearance:none;
border: 0px inset ThreeDFace ! important;
margin: 5px;
padding: 5px;
}
Example: http://jsfiddle.net/sJxst/
is this approach possible in Chrome?
There is a jquery plugin for this.. i don't know any other method yet for Chrome
http://archive.plugins.jquery.com/project/ui-checkbox
Also check this:
input.checkbox { display: none }
input.checkbox + label > span.checkbox-span { display: inline-block; color: #FFF; border: 1px solid #000; width: 30px; line-height: 30px; font-size: 24px; text-align: center }
input.checkbox:checked + label > span.checkbox-span { color: #000 }
http://jsfiddle.net/KfjuS/4/

Custom Navigation Bar breaks apart in Chrome.

I am just cleaning up some CSS for a client.
I am not a front-end person, but have been saved by bootstrap (thank you, twitter).
However, I am having a really hard time cleaning up a custom navigation panel
(no twitter). I have provided the CSS below. I need it to be able to:
1) close gracefully at the end (the beginning starts with a vertical border, not an arrow.
I would like the end to have symmetry and close the way it began).
2) Get the container to not expand to the end of the page.
3) I can't seem to get it to work in chrome. It falls apart in chrome but works in IE and Ff.
Here is the link. Any advice? Thanks so much.
http://annualdinnerdev.elasticbeanstalk.com/
/* ------- Wizard Interface ---------- */
#wizHeader
{
border: solid 3px #fff;
margin-bottom:25px;
-moz-box-shadow: 3px 3px 4px #C2CBCE;
-webkit-box-shadow: 3px 3px 4px #C2CBCE;
box-shadow: 3px 3px 4px #C2CBCE; /* For IE 8 */
-ms-filter: "progid:DXImageTransform.Microsoft.Shadow(Strength=4, Direction=135, Color='#C2CBCE')"; /* For IE 5.5 - 7 */
filter: progid:DXImageTransform.Microsoft.Shadow(Strength=4, Direction=135, Color= '#C2CBCE' );
}
#wizHeader li label
{
font-size:x-large;
}
#wizHeader li a
{
font-size:large;
}
#wizHeader li .prevStep
{
background-color: #D6E6FA;
color:#000;
}
#wizHeader li .prevStep:after
{
border-left-color: #D6E6FA !important;
}
#wizHeader li .currentStep
{
background-color: #6699CC;
color:#fff;
}
#wizHeader li .currentStep:after
{
border-left-color: #6699CC !important;
}
#wizHeader li .nextStep
{
background-color: #F0E9EA;
color:gray;
}
#wizHeader li .nextStep:after
{
border-left-color: #F0E9EA !important;
}
#wizHeader
{
list-style: none;
overflow: hidden;
font: 14px Helvetica, Arial, Sans-Serif;
margin: 0px;
padding: 0px;
}
#wizHeader li
{
float: left;
}
#wizHeader li a
{
color: white;
text-decoration: none;
padding: 10px 0 10px 55px;
background: brown; /* fallback color */
background: hsla(34,85%,35%,1);
position: relative;
display: block;
float: left;
}
#wizHeader li a:after
{
content: " ";
display: block;
width: 0;
height: 0;
border-top: 50px solid transparent; /* Go big on the size, and let overflow hide */
border-bottom: 50px solid transparent;
border-left: 30px solid hsla(34,85%,35%,1);
position: absolute;
top: 50%;
margin-top: -50px;
left: 100%;
z-index: 2;
}
#wizHeader li a:before
{
content: " ";
display: block;
width: 0;
height: 0;
border-top: 50px solid transparent;
border-bottom: 50px solid transparent;
border-left: 35px solid white;
position: absolute;
top: 50%;
margin-top: -50px;
margin-left: 1px;
left: 100%;
z-index: 1;
}
#wizHeader li:first-child a
{
padding-left: 10px;
}
#wizHeader li:last-child
{
padding-right: 18px;
}
Add a background color to #wizHeader to create the visual of a right-side border.
Specify a width value in #wizHeader to prevent it from expanding to the right of the page.
It seems to be working fine on Chrome for me (latest version)
Here are some examples of declarations to add to #wizHeader (add these to the ones currently in the CSS declaration)
#wizHeader {
background: #6699CC;
width: 960px;
}
Adding more based on comment...
The reason the arrows are being bumped down is because the 's are block elements, floated left, so they'll flow to fit whatever width they have available and drop down onto the next line when they run out.
If you want to cut off the last arrow, you'll have better luck by targeting the that wraps the last . This worked for me, editing in Chrome's Inspector:
#wizHeader li:last-child {
width: 172px; /* you might have to tweak this a bit*/
overflow: hidden;
padding-right: 0;
}
Then, change the width of the #wizHeader accordingly. 930px wide seemed to do the trick with the above snippet.

Use after: and before: selectors in versions 6 and 7 of Internet Explorer

I am using the nice style of the wizard mentioned in this blog
but unfortunately it does not work well in the IE, because as mentioned in the blog:
For browsers that don’t support :after/:before/ nth-child, the code will not work.
So is there any way to fix this problem to make work well in the IE browser.
FYI, the CSS is:
#wizHeader li .prevStep
{
background-color: #669966;
}
#wizHeader li .prevStep:after
{
border-left-color:#669966 !important;
}
#wizHeader li .currentStep
{
background-color: #C36615;
}
#wizHeader li .currentStep:after
{
border-left-color: #C36615 !important;
}
#wizHeader li .nextStep
{
background-color:#C2C2C2;
}
#wizHeader li .nextStep:after
{
border-left-color:#C2C2C2 !important;
}
#wizHeader
{
list-style: none;
overflow: hidden;
font: 18px Helvetica, Arial, Sans-Serif;
margin: 0px;
padding: 0px;
}
#wizHeader li
{
float: left;
}
#wizHeader li a
{
color: white;
text-decoration: none;
padding: 10px 0 10px 55px;
background: brown; /* fallback color */
background: hsla(34,85%,35%,1);
position: relative;
display: block;
float: left;
}
#wizHeader li a:after
{
content: " ";
display: block;
width: 0;
height: 0;
border-top: 50px solid transparent; /* Go big on the size, and let overflow hide */
border-bottom: 50px solid transparent;
border-left: 30px solid hsla(34,85%,35%,1);
position: absolute;
top: 50%;
margin-top: -50px;
left: 100%;
z-index: 2;
}
#wizHeader li a:before
{
content: " ";
display: block;
width: 0;
height: 0;
border-top: 50px solid transparent;
border-bottom: 50px solid transparent;
border-left: 30px solid white;
position: absolute;
top: 50%;
margin-top: -50px;
margin-left: 1px;
left: 100%;
z-index: 1;
}
#wizHeader li:first-child a
{
padding-left: 10px;
}
#wizHeader li:last-child
{
padding-right: 50px;
}
#wizHeader li a:hover
{
background: #FE9400;
}
#wizHeader li a:hover:after
{
border-left-color: #FE9400 !important;
}
.content
{
height:150px;
padding-top:75px;
text-align:center;
background-color:#F9F9F9;
font-size:48px;
}
The before and after css elements should work in ie8 and up.
For IE7 you can use something like Use the IE7.js hack to add after & before pseudo element support.
I would recommend using a conditional statement to include the file such as;
<!--[if IE 7]>
insert script here
<![endif]-->
For IE6, I personally would not bother and just degrade gracefully.
Another option is to use ie-css3.js.

Resources