Hi I have a small trouble with document.write(' '); Could you explain for me? I want to create a content/image and allow people copy a javascript file and it will show on their site. So I have show.js document.write('<link href="http://www.domain.com/css.css" rel="stylesheet" type="text/css" />'); document.write('<a href="http://www.domain.com/" name="corner" target="_blank" id="corner" style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src="http://www.domain.com/image.png",sizingMethod="scale");">Click here</a>'); Code (markup): Then I put <script type="text/javascript" language="javascript" src="http://www.domain.com/show.js"></script> to HTML code. Result show on Firefox is ok but on IE6, it doesnt work. In IE, it shows background only, not show image. I dont know how to fix , could some one help me please. This is CSS: Thanks
In your CSS you have: background: url(image.png) top right no-repeat !important; Code (markup): followed immediately by: background: none; Code (markup): Try getting rid of background:none;. It makes no sense to have both of them. IE is probably ignoring the !important attribute and just using the background:none; since it is parsed last.
I have fixed it, it works now Anyway, thank you a#support { position: absolute; right: 0; top: 0; display: block; height: 90px; width: 100px; background: url('image.png') top right no-repeat !important; [COLOR="Red"]filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='image.png');[/COLOR] background: none; text-indent: -999em; text-decoration: none; cursor: hand; } Code (markup):
That's a pretty bizarre way to go about it "fixing" it. If your goal is to have a background image displayed on the <a>, I would recommend correcting your existing CSS code rather than applying duct tape and band-aids.