BillyRayPreachersSon
Programmer
All,
A page we're developing has several ad banners on it, all contained within their own IFRAMEs (so that they can be refreshed programatically).
The IFRAMEs are contained within a DIV, and the DIV has a background on it that looks like a picture frame. This gives the nice effect of the ad banners being centred within a picture frame.
However, to get the picture frame to show in IE 6 & 7, a non-standard attribute, "allowTransparency", needs to be set on the IFRAMEs. This causes our page validation to fail.
We changed the code so that for IE 6 & 7, the attribute was added after page-load using JavaScript. However, with JavaScript switched off, the effect is no longer visible.
We thought about using conditional comments, but these cannot be used inside an element tag. We also thought about having multiple IFRAMEs when IE was detected (using conditional comments), and then hiding the first using CSS. Unfortunately, we cannot do this as it skews the ad impressions (marketing people like a level playing field).
Can anyone think of a way of delivering the "allowTransparency" attribute to the IFRAMEs without using JavaScript, and without breaking validation?
I'm beginning to think that server-side browser detection is the only way, but I'm really wanting to avoid that if I possibly can.
Thanks!
Dan
Coedit Limited - Delivering standards compliant, accessible web solutions
[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
A page we're developing has several ad banners on it, all contained within their own IFRAMEs (so that they can be refreshed programatically).
The IFRAMEs are contained within a DIV, and the DIV has a background on it that looks like a picture frame. This gives the nice effect of the ad banners being centred within a picture frame.
However, to get the picture frame to show in IE 6 & 7, a non-standard attribute, "allowTransparency", needs to be set on the IFRAMEs. This causes our page validation to fail.
We changed the code so that for IE 6 & 7, the attribute was added after page-load using JavaScript. However, with JavaScript switched off, the effect is no longer visible.
We thought about using conditional comments, but these cannot be used inside an element tag. We also thought about having multiple IFRAMEs when IE was detected (using conditional comments), and then hiding the first using CSS. Unfortunately, we cannot do this as it skews the ad impressions (marketing people like a level playing field).
Can anyone think of a way of delivering the "allowTransparency" attribute to the IFRAMEs without using JavaScript, and without breaking validation?
I'm beginning to think that server-side browser detection is the only way, but I'm really wanting to avoid that if I possibly can.
Thanks!
Dan
Coedit Limited - Delivering standards compliant, accessible web solutions
[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]