CSS slider issues in IE

Hi,

Have added the JQuery Nivo slider to my site. Runs and looks perfect in Firefox and Safari.

My Site

However, Explorer 8 does not display the drop shadow. IE7 does not display the drop shadow or run at all.

I ran CSS validator and it is showing 4 errors on the CSS side.

4 Errors

I also get this message on IE: There is an internet explorer script error on line 23. Is this related to the CSS errors?

If I can correct the 4 CSS errors will this fix it in IE? And can I still get the drop shadow effect I would like with another method?

Not sure why it will not scroll in IE7 yet, the slider doc says it should be compatible, but wanted to try and correct the CSS first.

Thank you for any help or pointers

You might want to take the jQuery issue over to Javascript forum… post the slider code and the IE error because while I can kinda sorta read Javascript I really can’t read jQuery (lk rdng txt spk) and there are a lot of jQuery junkies over there : )

Thanks Stomme poes, worked a treat :slight_smile:

Might play about with the levels of the shadow mind.

Didn’t realize how much off center it was either. The site shows in IE6 properly as a result now.

Just a case of seeing if the IE script error can be sorted to get it running in IE7.

And thanks for posting that link Eric. Think that will definitely come in handy down the line.

Ah! Great. That means you can avoid all the complexity of Eric’s (nice) demo.

Your whatever-box who’s doing all the JS stuff can just have one box wrapping around it, with a special-made-to-fit background image and padding all around that’s equal to the thickness of the shadow.

Or, heck… you could add padding all around your current box and give it the shadow background… was there also to be a border like in Eric’s example? If so, your shadow image would simply include this border (so you’d manually draw it in). The padding will keep the stuff inside the box from covering the shadow.

If this doesn’t make sense let me know and I’ll draw a quick example with some code.

*edit let’s see, in your case your #slider box has background images… so what I would do is use #sliderwrap to hold your bg image… and instead of doing like you’re doing now, I’d make #sliderwrap also 900px wide and whatever it is high, and use margin: 0 auto to center it (or, use whatever you want for top-bottom margins instead of 0) and then, if your shadow is 10px thick, add 10px of padding to it (so, the outside of #sliderwrap will become bigger than 900px… it’ll become 920px wide).

That’s brilliant, thanks. I have to be away from the computer for the next hour or so, so will attempt this when I get back.

Cheers again!

Or you could post an image of what you want… am I right that this box is a set width or set dimensions? That makes it easier because you can just use one wrapper and one image. Multiple divs/sandbags for backgrounds are more for boxes who could grow in one or two directions, so more code but more flexible. But if the box is set, you can save a lot of code.

Sorry, I took off the styling altogether (as it was bringing up the CSS errors). I could put it back on so you can see the effect in Firefox…And yes, it’s the slideshow which I meant, sorry for the confusion. It’s basically a drop shadow around the slide show (900px x 250px).

And thanks for the blog note. Your right, it’s only readable on a high res screen and will be sorting that today.

Even when I turn Javascript on, I can’t really see what’s supposed to have a shadow. I didn’t see a slider (something with a scrollbar like at the top of apple.com/mac) but I do see a slide show.
I clicked on “blog” to see if it was a menu thing (ok it wasn’t, you must mean the big computer) where I noticed the stuff after “Simplify” are unreadable (off topic I know but figured feedback is good).

I guess if I could see how you want this shadow I could better see the best way to implement it.

Having a bit of trouble applying the drop shadow using the link. I placed the starting Divs just before the “slidewrap” div, then the closing 4 Divs in the guide after the closing slidewrap div.

</head>

<body>

 <div id="Master">
  
 <div id="Main1">
    
 <div id="Header1">
      <div id="navbar"> <a href="index.html" class="blueon">Home</a> <a href="work.html">Work</a> <a href="wordpress/index.php">Blog</a> <a href="about.html">About</a> <a href="contact.html">Contact</a>    </div>
</div>
    

New Divs: <div id="shadow"><div id="a"></div><div id="b"></div><div id="c"><div id="d"><div id="e">



<div id="slidewrap">

<div id="slider">
  
  <img src="Images/indexmac.jpg" width="900" height="250" alt="simplicity" /> 
  
  <img src="Images/greenbindex.jpg" width="900" height="250" alt="beautiful code" /> 
  
  <img src="Images/eggsindex.jpg" width="900" height="250" alt="cuso design" />
  
  </div>

</div>

New Divs: </div></div></div></div>



Added the CSS and the image, but it messed up the other Divs.

Have I place the Divs in the correct place or have I messed up elsewhere?:injured:

Thanks Stomme poes. Is it strange that it only shows up the error in IE7 and not 8? It’s a shame because it says it is IE7 compliant. This is the only JScript I am running on this page. There is another slider running but that’s on the ‘work’ page.

Hopefully it’s not something too big to fix.

also get this message on IE: There is an internet explorer script error on line 23. Is this related to the CSS errors?

This is likely a Javascript error. Unfortunate of IE that, if you are calling multiple scripts, that it does not tell you which script file has the error (if there’s a way anyone knows to see this, I’d love to know!). Since jQuery itself is written pretty cross-browser, it’s not going to be the main library you call, but it could be the slider-specific script. Or, it could be any other script.

Correcting the shadow issue shouldn’t have anything to do with the slider-not-sliding issue.

I think the best example I can find is this one: shadow tut A permanent drop shadow around the slideshow.

And yes it has set dimensions so no need for it to be flexible in this case.

Great stuff Razer, thanks.

Still quite new to CSS so even the obvious doesn’t always stand out:blush:

Shall give the link a wirl and see how it goes.

Cheers

However, Explorer 8 does not display the drop shadow. IE7 does not display the drop shadow or run at all.

I ran CSS validator and it is showing 4 errors on the CSS side.
Hi,
Those errors should have given you the clue as to why your shadows don’t work in IE. :slight_smile:

#slider {
    position:relative;
[COLOR=Red]    -moz-box-shadow:0px 0px 10px #333;
    -webkit-box-shadow:0px 0px 10px #333;
    box-shadow:0px 0px 10px #333;[/COLOR]
    height: 250px;
    width: 900px;
}

Those box-shadow properties are vendor specific and CSS3 properties.
IE does not support them, you will need to use an image if you want x-browser support.