1

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;
}
il_guru
  • 8,383
  • 2
  • 42
  • 51
Mohammed Al-Ali
  • 75
  • 2
  • 10
  • Duplicate of http://stackoverflow.com/questions/4181884/after-and-before-css-pseudo-classes-hack-for-ie-7 – dash Dec 07 '11 at 08:39

1 Answers1

1

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.

Interrobang
  • 16,984
  • 3
  • 55
  • 63
Dominic Green
  • 10,142
  • 4
  • 30
  • 34