CSS in IE8 not working - css

This is doing my head in, please can someone help? I have made a site, works in Ie9 + 10 and all other browsers, but the animated menu doesnt work in IE8 and there are people using that to view the site..
here is the css:
.menu, .menu ul, .menu li, .menu a {
margin: 0;
padding: 0;
border: none;
outline: none;
}
.menu {
height: 40px;
width: 800px;
background: #f7d000;
background: -webkit-linear-gradient(top, #f7d000 0%,#f7d000 100%);
background: -moz-linear-gradient(top, #f7d000 0%,#f7d000100%);
background: -o-linear-gradient(top, #f7d000 0%,#f7d000 100%);
background: -ms-linear-gradient(top, #f7d000 0%,#f7d000 100%);
background: linear-gradient(top, #f7d000 0%,#f7d000 100%);
-webkit-border-radius: 0px;
-moz-border-radius: 0px;
border-radius: 0px;
}
.menu li {
position: relative;
list-style: none;
float: left;
display: block;
height: 50px;
}
.menu li a {
display: block;
padding: 0 14px;
margin: 5px 0;
line-height: 28px;
text-decoration: none;
font-family: 'Titillium Web', sans-serif;
font-weight: bold;
font-size: 15px;
color: #000000;
-webkit-transition: color .2s ease-in-out;
-moz-transition: color .2s ease-in-out;
-o-transition: color .2s ease-in-out;
-ms-transition: color .2s ease-in-out;
transition: color .2s ease-in-out;
}
.menu li:first-child a {
border-left: none;
}
.menu li:last-child a {
border-right: none;
}
.menu li:hover > a {
color: #ffffff;
}
.menu ul {
position: absolute;
top: 40px;
left: 0;
z-index: 999;
opacity: 0;
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
background: #f7d000;
-webkit-border-radius: 0 0 5px 5px;
-moz-border-radius: 0 0 5px 5px;
border-radius: 0 0 5px 5px;
-webkit-transition: opacity .25s ease .1s;
-moz-transition: opacity .25s ease .1s;
-o-transition: opacity .25s ease .1s;
-ms-transition: opacity .25s ease .1s;
transition: opacity .25s ease .1s;
}
.menu li:hover > ul {
opacity: 1;
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
}
.menu ul li {
height: 0;
overflow: visible;
padding: 0;
-webkit-transition: height .25s ease .1s;
-moz-transition: height .25s ease .1s;
-o-transition: height .25s ease .1s;
-ms-transition: height .25s ease .1s;
transition: height .25s ease .1s;
}
.menu li:hover > ul li {
height: 36px;
overflow: visible;
padding: 0;
}
.menu ul li a {
width: 180px;
padding: 8px 10px;
margin: 0;
border: none;
border-bottom: 1px solid #f7d000;
}
.menu ul li:last-child a {
border: none;
}
The site is: www.softwaretestingawards.com any help would be appreciated!

IE8 does not support CSS3 animations.
See this reference:
http://caniuse.com/#search=css%20tran
You many want to consider using javascript animations, like jQuery.animate
http://api.jquery.com/animate/

The reason it won't work in Internet Explorer 8 is because it does not support CSS3 animations. I recommend you make a script to detect if Internet Explorer 8 is being used and, if it is, dynamically change the website so it doesn't have the fancy CSS3 animations.

to make work the css in IE8 you can try using PIE.htc, refere this site for solution and demos if you want http://css3pie.com/demos/, actually it worked for me :)

Related

drop-down menu closing issue in wordpress?

I already succeed to added the transition effect when hover the cursor to drop-down menu (click the "M" logo) in my own wordpress theme but when the cursor being away from drop-down menu don't show the transition effect when closing. You can check out my own theme on this link for further info.
Here drop-down css style:
.dropdown-menu {
border-bottom-right-radius: 77px;
border-bottom-left-radius: 77px;
/* background: url(img/submenu.png) no-repeat scroll right/ 91% 100%; */
position: absolute;
height:0;
top: 100%;
left: 0;
z-index: 1000;
display: none;
float: left;
min-width: 153px;
padding: 1px 0;
margin: 2px 0 0 0;
list-style: none;
font-size: 14px;
text-align: center;
background-color: transparent!important;
border: 1px solid #ccc;
border: 1px solid rgba(0,0,0,0.15);
background-clip: padding-box;
opacity: 0;
top: 35px;
visibility: hidden;
-webkit-transition:height 300ms ease-in;
-moz-transition:height 300ms ease-in;
-ms-transition: height 300ms ease-in;
-o-transition:height 300ms ease-in;
transition:height 300ms ease-in;
overflow: hidden;
}
.navbar-nav li:hover .dropdown-menu {
opacity: 1;
top: 105px;
visibility: visible;
height:300px;
}
So How I can add the transition effect when drop-down menu closing?
Instead of transitioning only the height you could try
-webkit-transition: all 300ms ease-in;
-moz-transition: all 300ms ease-in;
-ms-transition: all 300ms ease-in;
-o-transition: all 300ms ease-in;
transition: all 300ms ease-in;

How I can make Pure CSS3 Smooth Drop-Down Menu in wordpress?

I am making a bootstrap wordpress theme and I have a problem about adding pure smooth drop-down menu effect for primary menu like this example such as it does not seem to work properly after clicked "M logo" to open drop-down menu. You can check out my theme on this link for more detail
Here are my CSS classes at the moment:
.navbar-nav>li>.dropdown-menu {
margin: -1px 0 0 45%;
border-top-right-radius: 0;
border-top-left-radius: 0;
}
.dropdown-menu {
/* background: url(img/submenu.png) no-repeat scroll right/ 91% 100%; */
position: absolute;
top: 100%;
left: 0;
z-index: 1000;
display: none;
float: left;
min-width: 153px;
padding: 1px 0;
margin: 2px 0 0 0;
list-style: none;
font-size: 14px;
text-align: center;
background-color: #5c4d4a;
border: 1px solid #ccc;
border: 1px solid rgba(0,0,0,0.15);
border-radius: 4px;
-webkit-box-shadow: 0 6px 12px rgba(0,0,0,0.175);
box-shadow: 0 6px 12px rgba(0,0,0,0.175);
background-clip: padding-box;
}
.dropdown-menu li a {
display: block;
background: url(img/submenu.png) no-repeat scroll right/ 104% 108%;
padding: 10px 20px;
clear: both;
font-weight: normal;
line-height: 1.428571;
color: #fff;
white-space: nowrap;
}
.dropdown-menu li a:hover,
.dropdown-menu li a:focus {
background: url(img/submenu.png) no-repeat scroll right/ 104% 108%;
color: #ccc;
text-decoration: none;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff357ebd', GradientType=0);
-webkit-transition: all .25s ease;
-moz-transition: all .25s ease;
-ms-transition: all .25s ease;
-o-transition: all .25s ease;
transition: all .25s ease;
}
.dropdown-menu ul {
list-style: none;
}
The salient features required are:
.dropdown-menu {
opacity: 0;
position: absolute;
top: 35px;
visibility: hidden;
-webkit-transition: all .25s ease;
-moz-transition: all .25s ease;
-ms-transition: all .25s ease;
-o-transition: all .25s ease;
transition: all .25s ease;
}
nav li:hover .dropdown-menu {
opacity: 1;
top: 50px;
visibility: visible;
}
The float:left is a furfy, it is over-ridden by position:absolute;

Why does my CSS animation not work on my sidebar?

Good Day, I'm trying to create a slidedown menu using some JS and CSS but it's not working. Here's the fiddle link:
ul.show-child{
height: auto;
display: block;
-webkit-transition: height 1s ease;
-moz-transition: ease-in 2s none;
-ms-transition: ease-in 2s none;
-o-transition: ease-in 2s none;
transition: ease-in 2s none;
}
https://jsfiddle.net/gkrja9jy/
What I want to do, is to add some cool animation when I show the hidden div. By the way, I just copied the transition effect from this site
There is a pure CSS solution. I corrected your example. Make sure that you write correct HTML code. Here is the new code and a fiddle:
HTML code:
<ul class="custom-sidebar">
<li>
Accountancy
</li>
<li>
Grade School
<ul>
<li>Goals and Objectives</li>
<li>Clubs and Orgs</li>
<li>Photo Gallery</li>
<li>Summer Tutorial</li>
</ul>
</li>
</ul>
CSS code:
li ul {
display: block;
height: 0px;
overflow: hidden;
-webkit-transition: all 0.25s ease-in-out;
-moz-transition: all 0.25s ease-in-out;
-ms-transition: all 0.25s ease-in-out;
-o-transition: all 0.25s ease-in-out;
transition: all 0.25s ease-in-out;
}
li:hover ul {
height: 100px;
display: block;
}
.custom-sidebar a,.custom-sidebar a:visited {
color: #0f5882;
display: block;
font-weight: bold;
height: 25px;
margin-left: -23px;
padding-left: 23px;
vertical-align: middle;
width: 100% !important;
}
.custom-sidebar li {
list-style: outside none none;
padding-left: 17px;
}
.custom-sidebar li a {
background-color: #ebecec;
border-left: 6px solid #116b9e;
padding-top: 2px;
margin-bottom: 8px;
}
https://jsfiddle.net/u6yrL0a0/2/
It is usually best to avoid JavaScript if it is not needed.
yo can use jquery to create the animation like this:
var jq=jQuery.noConflict();
jq(document).ready(function(){
jq('.menu-div').hover(function(){
if(jq(this).children(":first").hasClass('has-child')){
var thisx = jq(this).children(":first");
thisx.next('ul').slideDown(1000);
}
});
});
jq(document).ready(function(){
jq('.menu-div').mouseleave(function(){
if(jq(this).children(":first").hasClass('has-child')){
var thisx = jq(this).children(":first");
thisx.next('ul').slideUp(1000);
}
});
});
and the css will be like this :
ul.hide-child{
display: none;
overflow: hidden;
}
ul li ul{
-webkit-transition: all 1s;
-moz-transition: all 1s ;
transition: all 1s;
display:none;
height:auto;
}
.custom-sidebar .post-link,.post-link:visited{
color: #0f5882;
display: block;
font-weight: bold;
height: 25px;
margin-left: 0px;
padding-left: 23px;
vertical-align: middle;
width: 100% !important;
}
.custom-sidebar li{
background-color: #ebecec;
border-left: 6px solid #116b9e;
list-style: outside none none;
margin-bottom: 0px;
padding-left: 17px;
padding-top: 2px;
}
https://jsfiddle.net/gkrja9jy/5/

Pure CSS Drop-down Menu Not Displaying Properly in IE8

My pure css drop-down menu works in all major browsers except IE8. There are two issues.
1) The background color of menu doesn't display until the mouse rolls over one of the menu items. (see photo in link below)
http://www.searchtransparency.net/stackoverflow/2.jpg
2) If the menu is exited from the parent link (treatments) it leaves a shortened version of the background displaying. (see photo in link below)
http://www.searchtransparency.net/stackoverflow/1.PNG
CSS:
.menu,
.menu ul,
.menu li,
.menu a {
margin: 0;
padding: 0;
border: none;
outline: none;
z-index:3;
}
.menu {
height: 53px;
width: 994px;
}
.menu li {
position: relative;
list-style: none;
float: left;
display: block;
height: 38px;
padding-top: 15px;
}
.menu li a {
display: block;
padding-left: 44px;
padding-right: 44px;
-webkit-transition: color .2s ease-in-out;
-moz-transition: color .2s ease-in-out;
-o-transition: color .2s ease-in-out;
-ms-transition: color .2s ease-in-out;
transition: color .2s ease-in-out;
margin-top: 0px;
margin-right: 0;
margin-bottom: 0px;
margin-left: 0;
padding-top: 0;
padding-bottom: 0;
}
.menu li:first-child a { border-left: none; }
.menu li:last-child a{ border-right: none; }
.menu li:hover > a { color:#CCC; }
.menu ul {
position: absolute;
top: 53px;
left: 0;
opacity: 0;
-webkit-border-radius: 0 0 5px 5px;
-moz-border-radius: 0 0 5px 5px;
border-radius: 0 0 5px 5px;
-webkit-transition: opacity .25s ease .1s;
-moz-transition: opacity .25s ease .1s;
-o-transition: opacity .25s ease .1s;
-ms-transition: opacity .25s ease .1s;
transition: opacity .25s ease .1s;
-webkit-box-shadow: 0px 0px 5px 0px #333;
box-shadow: 0px 0px 5px 0px #333;
background-color: #222;
padding-bottom: 15px;
visibility: hidden;
behavior: url(PIE.htc);
}
.menu li:hover > ul {
opacity: 1;
visibility: visible;
}
.menu ul li {
height: 0;
overflow: hidden;
padding: 0;
-webkit-transition: height .25s ease .1s;
-moz-transition: height .25s ease .1s;
-o-transition: height .25s ease .1s;
-ms-transition: height .25s ease .1s;
transition: height .25s ease .1s;
}
.menu li:hover > ul li {
height: 25px;
overflow: visible;
}
.menu ul li a {
width: 175px;
margin: 0;
font-size: 12px;
text-shadow: none;
border: none;
padding-left: 25px;
height: 20px;
padding-top: 5px;
}
.menu ul li:last-child a { border: none; }
.menu li li:hover > a {
background-color: #666;
}
HTML:
<ul class="menu">
<li><img src="images/icon-home.png" alt="Home" width="18" height="18" border="0"></li>
<li>Meet The Doctor</li>
<li class="icon-dropdown-arrow">Treatments
<ul>
<li style="font-size:14px; padding-left:15px; padding-top:10px; margin-top:10px;">Skin Resurfacing</li>
<li>Fraxel® Restore</li>
<li style="font-size:14px; padding-left:15px; padding-top:10px; margin-top:0px;">Skin Tightening</li>
<li>Thermage®</li>
<li>Refirme® Photo-Rejuvenation</li>
<li style="font-size:14px; padding-left:15px; padding-top:10px; margin-top:0px;">Cellulite Treatments</li>
<li>LPG Lipomassage™</li>
<li>VelaShape™</li>
<li>Thermage®</li>
<li>Ionithermie Treatment</li>
<li style="font-size:14px; padding-left:15px; padding-top:10px; margin-top:0px;">Injectibles</li>
<li>Dermal Fillers</li>
<li>Botox® Cosmetic</li>
<li style="font-size:14px; padding-left:15px; padding-top:10px; margin-top:0px;">Other</li>
<li>Laser Hair Removal</li>
<li>Skin Treatments (Face & Body)</li>
<li>Skin Rejuvenation</li>
<li>Plastic Surgery</li>
<li>Massage</li>
</ul>
</li>
<li>Specials</li>
<li>Reviews</li>
<li>Contact</li>
</ul>
Code on JsFiddle.net
As i remember IE understand :hover only just for "a" tag.
:last-child doesn't support too, question about :last-child

Problems Creating a Pure CSS Dropdown Submenu in Submenu

Hello I was wondering whether this is possible. I have a horizontal menu created using CSS with submenus and it works just fine. However, I want to have submenus appear to the right of the submenus already appearing.
The menu is as such: http://jsfiddle.net/dvpKx/39/
And the code is:
/*First reset ul styles*/
.nav,
.nav ul,
.nav li,
.nav a {
margin: 0;
padding: 0;
border: none;
outline: none;
}
/*Now add fixed width & height to the menu along with rounded corners and gradients*/
.nav {
height: 50px;
width: inherit;
margin: 10px;
background: -webkit-linear-gradient(top, rgb(198,56,32) 0%, rgb(127,48,35) 100%);
background: -moz-linear-gradient(top, rgba(198,56,32,1) 0%, rgb(127,48,35) 100%);
background: -o-linear-gradient(top, rgb(198,56,32) 0%, rgb(127,48,35) 100%);
background: -ms-linear-gradient(top, rgb(198,56,32) 0%, rgb(127,48,35) 100%);
background: linear-gradient(top, rgb(198,56,32) 0%, rgb(127,48,35) 100%);
-webkit-border-radius: 15px;
-moz-border-radius: 5px;
border-radius: 5px;
}
/*Float links left to align links horizontally & position relative to align submenus properly*/
.nav li {
position: relative;
list-style: none;
float: left;
display: block;
height: 50px;
}
/*
Styling menu links -
font, color, padding, etc. Then a dark text shadow and a color transition to create a smooth effect when the color changes on hover state. To create the links separator add a border to the left and right and then we will remove the left border from the first link and the right border from the last link. For the hover state we will only change the text color.
*/
.nav li a {
border-bottom: none;
background: none;
display: block;
padding: 0 14px;
margin: 6px 0;
line-height: 32px;
text-decoration: none;
border-left: 1px solid #393942;
border-right: 1px solid #4f5058;
font-family: Verdana, sans-serif;
font-weight: bold;
font-size: 14px;
color: #f3f3f3;
text-shadow: 2px 3px 0px rgba(0,0,0,0.6);
-webkit-transition: color .2s ease-in-out;
-moz-transition: color .2s ease-in-out;
-o-transition: color .2s ease-in-out;
-ms-transition: color .2s ease-in-out;
transition: color .2s ease-in-out;
}
.nav li:first-child a { border-left: none; }
.nav li:last-child a{ border-right: none; }
.nav li:hover > a {
color: rgb(114,163,45);
background: none;
font-size: 18px;
}
/*
SUB MENU 1
We will start to position the sub menu 50px from the top and 0px from the left of the menu item and add bottom rounded corners. We will set the opacity to 0 and on hover state to 1 to create the fade in/out effect. For the slide down/up effect we need to set the list height to 0px when is hidden and to 36px on hover state.
*/
.nav ul {
position:absolute;
top: 50px;
padding-left: 0px;
opacity: 1;
background: rgb(43,35,34);
-webkit-border-radius: 0 0 5px 5px;
-moz-border-radius: 0 0 5px 5px;
border-radius: 0 0 5px 5px;
-webkit-transition: opacity .25s ease .1s;
-moz-transition: opacity .25s ease .1s;
-o-transition: opacity .25s ease .1s;
-ms-transition: opacity .25s ease .1s;
transition: opacity .25s ease .1s;
}
.nav li:hover > ul { opacity: 1; }
/* Hiding submenu 1 */
.nav ul li {
height: 0;
overflow: hidden;
padding: 0;
-webkit-transition: height .25s ease .1s;
-moz-transition: height .25s ease .1s;
-o-transition: height .25s ease .1s;
-ms-transition: height .25s ease .1s;
transition: height .25s ease .1s;
}
/* When hovered over, show submenu 1 */
.nav li:hover > ul li {
height: 46px;
overflow: hidden;
padding: 0;
z-index: 8999;
}
/* Hiding submenu TWO */
.nav ul ul li {
height: 0;
overflow: hidden;
padding: 0;
-webkit-transition: height .25s ease .1s;
-moz-transition: height .25s ease .1s;
-o-transition: height .25s ease .1s;
-ms-transition: height .25s ease .1s;
transition: height .25s ease .1s;
}
/* When hovered over, show submenu 1 */
.nav li:hover > ul ul li {
height: 80px;
padding: 0;
z-index: 9000;
}
/* Setting width of submenu to 100px & add a bottom border instead of left and right ones
(also removing it from last link) */
.nav ul li a {
width: 250px;
padding: 4px 0 4px 40px;
margin: 0;
border: none;
border-bottom: 1px solid #343438;
}
.nav ul li:last-child a { border: none; }
​
I would recommend the Son of Suckerfish dropdown (a CSS solution).
Code: http://www.htmldog.com/articles/suckerfish/dropdowns/ (specifically the Multi-level dropdown section about 1/2 down). Also, links to examples are shown at the bottom of the page.
You can try this
.menus {
width:100px;
height:50px;
border: 5px solid #000000;
border-radius: 25px;
text-align: center;
line-height: 50px;
color: black;
background-color: #dcdcdd;
}
.submenus {
margin-top:10px;
display:none;
width:100px;
height:50px;
border: 5px solid #000000;
border-radius: 25px;
text-align: center;
line-height: 50px;
color: black;
}
#menu1outer:hover #submenus1 {
display: block;
}
Hope that helps and you can see the sample here:
reformas integrales madrid

Resources