SWF Object Causing IE top margin problems
I have a flash mp3 player on my website that is causing the main wrapper of the page to shift down by about 3px. The pages display perfectly in Fire Fox but when I open them in Internet Explorer 8 there is appears to be a margin set (same colour as the background).

When I remove the SWF from the page it works fine in all browsers. I have tried changing the margin-top to -3px. That works for IE but when I open the page in Fire Fox the top couple of pixels of the wrapper is cut off.

I tried using a conditional stylesheet to change the top margin to -2px when IE is being used. That was able to get rid of the white space but there is still a background colour space between the main wrapper and the top. As though the wrapper shifted down a couple px.

Any suggestions would be greatly appreciated!

Recommended Answers

All 3 Replies

A conditional stylesheet should fix it. This goes under your stylesheet link in the head section:
Code:

<!--[if IE 8]>
<link rel="stylesheet" type="text/css" href="ie8fix.css" />
<![endif]-->

The new stylesheet (ie8fix.css) should only contain the negative margin fix.

thanks maryparker...but I've tried that already. Still having the same problem

Hi. I'm not sure if your problem is similar to mine. I'm embedding flash content with SWFobject and div tag. This displays correctly in Firefox and Chrome, but when I load it in IE, a big margin appear to bottom and right. Have you solved the problem? Thanks.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.