views:

199

answers:

1

I have the following markup on a page and unfortunately I do not have direct access to it. . This page is opened in an iframe. There is other code on the page but it is not relevant so I have not posted it.

The only access to target the code in via css.

I want to not display the close button so I added this to the css file

img[alt='Close'] {display:none !important;} 

this is the markup

<td align="center"><a href='javascript:window.close()'><img src='v/vspfiles/templates/100/images/buttons/btn_close.gif' alt='Close' border=0></a></td>

It works as expected in all browsers that i have tested (firefox, Opera, Safari) but in IE8 it seems to ignore this css and shows the button. Not sure if it doesn't like the selector or perhaps I have a syntax error.

Not sure where to go from here.

+2  A: 

IE8 supports Attribute Selectors, but only when the page is setup for "standards-compliant mode". The following provides more information:

http://msdn.microsoft.com/en-us/library/aa770069.aspx [Read the Remarks Section] http://msdn.microsoft.com/en-us/library/cc288325.aspx

Also the following link tells you what DTD turns standards compliance mode "on" in IE8

http://msdn.microsoft.com/en-us/library/ms535242.aspx [Scroll to the table]

Waleed Al-Balooshi
I see so it is a IE issue. and darn there is no doc deceleration on this page and I have no access to the markup to add the the strict doc type, like i said gotta luv MS
@user357034 you either need to change the markup, configure the web server to specify a default mode, or make changes to your register (this last option will only affect you, but other users will still see the non standards mode). The second document I linked to includes all the information about Document Compatibility Modes. Sorry the answer is not what you were hoping for :(
Waleed Al-Balooshi
thx but the 1st is not possible as I do not have access to the markup since it is the output of an .asp page in an iframe. I have no access to the web server as this is a e-commerce site. The third quite frankly i have no idea what it is. Thx for the replies.
I meant the windows registry. I wouldn't recommend it though.
Waleed Al-Balooshi