I have this css code for an select tag
.sele {
-webkit-transform:scale(0.8);
-moz-transform:scale(0.8);
-webkit-transition-duration: 0.3s;
-moz-transition-duration: 0.3s;
-o-transition-duration: 0.3s;
opacity: 0.75;
margin: 0 10px 5px 0;
}
.sele:hover {
-webkit-transform:scale(1.1);
-moz-transform:scale(1.1);
-o-transform:scale(1.1);
box-shadow:0px 0px 30px gray;
-webkit-box-shadow:0px 0px 30px gray;
-moz-box-shadow:0px 0px 30px gray;
opacity: 1;
}
It is working well on Mozilla Firefox but has no effect on chrome or Internet explorer
First of all i would advice you to have a look into this
That's weird... i have tested your code on 5 browsers ( Chrome, Mozilla , Safari , Opera , IE ) and only IE had a problem with the transform which you can solve it by adding the code below:
transform: scale(2,4);
Check the fiddle here
Edit: I don't think you can use this directly on a select option, but you have wrap the select tag within a div and apply that to the div.
Example
Related
I have added drop shadows to labels for checkboxs so that when they are checked the drop shadow appears. They work perfectly on chrome however when I tried them on safari on both my mac and iPhone the drop shadows are not appearing. I have tried using the -webkit-filter CSS but this has not had any effect.
I have included both the HTML and CSS below.
<li>
<input type="checkbox" id="dairy" name="lifestyle" value="dairy-">
<label for="dairy">
<img src="https://cdn.shopify.com/s/files/1/0433/2958/5306/files/Cheese_Icon.png?v=1611093331" class="choose--contents--img" alt="">
<p>Dairy</p>
</label>
</li>
label {
display: flex;
flex-direction: column;
align-items: center;
border: 1px solid #5E7735;
background-color: white;
border-radius: 8px;
width: 117.5px;
height: 140px;
box-sizing: border-box;
cursor: pointer;
}
:checked + label {
filter: drop-shadow(6px 6px 0 #5E7735);
-webkit-filter: drop-shadow(6px 6px 0 #5E7735);
-moz-filter: drop-shadow(6px 6px 0 #5E7735);
-ms-filter: drop-shadow(6px 6px 0 #5E7735);
-o-filter: drop-shadow(6px 6px 0 #5E7735);
transition: filter 0.1s ease-in;
-webkit-transition: filter 0.1s ease-in;
}
They should look like this
But they look like this (the shadow is cut off)
As I was playing with this I think one solution could be to use a box shadow, and apply border-radius that is using vw, for proportionality.
Something like this:
.class {
box-shadow: 6px 6px 0 #5E7735;
border-radius: 5vw; /* Or whatever fits the corners of the image used) */
}
It's a workaround but hopefully it can help someone out there!
I have written a page in html and css.
Here is the page:
https://wheelertechconsulting.com/page1.html
I designed this page using chrome and when i uploaded to my website, I checked it out in firefox and noticed that that the ul li entrys in the the body div are compressed to the right.
What could be causing this error?
I found the solution, but you must correct the mistakes mentioned in my previous answer
The problem is in :
.featured-images li {
padding: 0 auto 1% 1%;
border: .2em solid black;
margin: 1%;
! height: 8em;
-webkit-transition: all 0.4s;
-moz-transition: all 0.4s;
-ms-transition: all 0.4s;
-o-transition: all 0.4s;
transition: all 0.4s ease;
background: linear-gradient(rgba(0, 255, 255, 0.8), rgba(0, 0, 255, 0.8));
}
If you comment this part of the code : ! height: 8em; the problem will be resolved.
Next image before comment ! height: 8em;
But after the comment ! height: 8em; the appearance will become as in the following
image
This part of the code is in the style file at the line 101.
You have many errors in the CSS file
There is 6 errors and 12 warnings in your CSS file.
I used the CSS online validator to discover it
Try to fix those problems, maybe solve this problem.
You can see what the problem is and what line it will be in.
I am creating a modal dialog based on a CSS only approach from the online example below. It works great in IE 11, Chrome and Firefox, but in IE 9 and IE 10, the modal doesn't work.
In IE 9 and IE 10, you can't click any of the content - in this example it's a link, but in my own implementation I have several buttons on the page, only one of which actually opens the modal, and they all can't be clicked - I'm thinking because the modal might be sitting overtop of the buttons somehow, even though it's invisible.
Can anyone please help me figure out why this isn't working in IE 9 and IE 10, and whether there's anything I can do to fix it in those browsers? Also, I'm a little new to web development. Is there any tools that can analyze your markup and CSS to see if there's any compatibility issues with older browsers? Maybe a tool like that could have helped me here.
Here is the JSFiddle
http://jsfiddle.net/kumarmuthaliar/GG9Sa/1/
Or here is the code you could just save into an HTML file and load into the browser.
<!doctype html>
<html lang="en">
<head>
<style>
.modalDialog {
position: fixed;
font-family: Arial, Helvetica, sans-serif;
top: 0;
right: 0;
bottom: 0;
left: 0;
background: rgba(0, 0, 0, 0.8);
z-index: 99999;
opacity:0;
-webkit-transition: opacity 400ms ease-in;
-moz-transition: opacity 400ms ease-in;
transition: opacity 400ms ease-in;
pointer-events: none;
}
.modalDialog:target {
opacity:1;
pointer-events: auto;
}
.modalDialog > div {
width: 400px;
position: relative;
margin: 10% auto;
padding: 5px 20px 13px 20px;
border-radius: 10px;
background: #fff;
background: -moz-linear-gradient(#fff, #999);
background: -webkit-linear-gradient(#fff, #999);
background: -o-linear-gradient(#fff, #999);
}
.close {
background: #606061;
color: #FFFFFF;
line-height: 25px;
position: absolute;
right: -12px;
text-align: center;
top: -10px;
width: 24px;
text-decoration: none;
font-weight: bold;
-webkit-border-radius: 12px;
-moz-border-radius: 12px;
border-radius: 12px;
-moz-box-shadow: 1px 1px 3px #000;
-webkit-box-shadow: 1px 1px 3px #000;
box-shadow: 1px 1px 3px #000;
}
.close:hover {
background: #00d9ff;
}
</style>
</head>
<body>
Open Modal
<div id="openModal" class="modalDialog">
<div>
X
<h2>Modal Box</h2>
<p>This is a sample modal box that can be created using the powers of CSS3.</p>
<p>You could do a lot of things here like have a pop-up ad that shows when your website loads, or create a login/register form for users.</p>
</div>
</div>
</body>
The way the code is rendering in IE 10 is the modal opacity is set to 0 but the modal layer is still existing above the the 'open modal' link since the modal z-index is set to 99999. If you change the link to have a position: relative and a z-index that is larger than 99999 you will be able to access the modal using your link except now the link will show "on top" of the modal when its opened (which I am assuming you dont want to have happen)
Part of problem is pointer events are not supported in IE 9 & 10. You can read more about that here (and maybe find a work around?)
I personally suggest using a .hide class that has display:none; and use JQuery to show/hide that class so as to easily toggle your modal.
Hope that helps
Set the initial state of the modal to z-index:-1.
There is a conflict with the z-indexes. Despite the modal has no opacity, it still takes up the space and prevents the link to be clicked on IE10.
See Demo
I have created following glow effect for my image controls but it is not working on IE. How can i make it run on IE9? or any alternative?
#-webkit-keyframes redPulse {
from { background-color: #FF5959; -webkit-box-shadow: 0 0 40px #FF5959; }
50% { background-color: #FD9FA2; -webkit-box-shadow: 0 0 40px #FD9FA2; }
to { background-color: #FF5959; -webkit-box-shadow: 0 0 40px #FF5959; }
}
.red{
-webkit-animation-name: redPulse;
-webkit-animation-duration: 2s;
-webkit-animation-iteration-count: infinite;
width:200px;
padding-top:0px;
margin-top:0px;
}
It's still not suported
Internet Explorer does not yet support the #keyframes rule or the
animation property.
Firefox requires the prefix -moz-, Chrome and Safari require the
prefix -webkit-, and Opera require the prefix -o-.
From: http://www.w3schools.com/css3/css3_animations.asp
upd
maybe it's can help in your case with some jquery
http://placenamehere.com/article/384/css3boxshadowininternetexplorerblurshadow/
Make glowing effect around the text box while placing the cursor inside the textbox.
For example : just place the cursor inside the search textbox in our stackoverflow.com.
Its because of css, but i dont know how to achieve it.. Please help me.
Instead of outlines, the box-shadow property achieves a very smooth, nice effect of any text field:
field {
border-color: #dbdbdb;
}
field:focus { /* When you click on the field... */
border-color: #6EA2DE;
box-shadow: 0px 0px 10px #6EA2DE;
}
Here's a JSFiddle Demo I once made myself showing the above code with a transition fade effect.
While the effect you observe on the stackoverflow search box is probably browser specific (e.g. Google Chrome) there is a way to achieve what you want using the CSS :focus pseudo class:
#foo:focus { border: 2px solid red; }
<input id="foo" type="text"/>
Outline property
http://www.w3schools.com/css/pr_outline.asp
If you want it to appear when clicking on a text box:
input:focus { outline: /* whatever */ }
IE7 doesn't support the :focus selector, but you can use jQuery:
$("input").focus(function () {
$(this).css('outline','yellow solid thin');
});
Obviously outline isn't supported by IE7 and even if it was I doubt it would "glow". You need to do this with a custom background image or something. There's an example of doing that here:
http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/CSS/Q_24084560.html
BTW: You say "border color". A border is not an outline. You can just use:
<input onfocus="this.style.border='2px solid yellow'">
You can do it with the CSS :focus pseudo-class but chances are IE6/7 doesn't support it.
Code-
input[type=text], textarea {
-webkit-transition: all 0.30s ease-in-out;
-moz-transition: all 0.30s ease-in-out;
-ms-transition: all 0.30s ease-in-out;
-o-transition: all 0.30s ease-in-out;
outline: none;
padding: 3px 0px 3px 3px;
margin: 5px 1px 3px 0px;
border: 1px solid #DDDDDD;
}
input[type=text]:focus, textarea:focus {
box-shadow: 0 0 5px rgba(81, 203, 238, 1);
padding: 3px 0px 3px 3px;
margin: 5px 1px 3px 0px;
border: 1px solid rgba(81, 203, 238, 1);
}
Demo- http://www.labshab.com/submit-guest-posts/
If you're using bootstrap you can use
class="form-control"