IFRAME border showing in IE7
Hi guys I have aproblem with an IFRAME
How can I turn off ALL the borders in IE7
firefox and IE6 was easy with CSS but not in IE7
If you want I can show you code
border-width: 0; border-color: (same as bg)
I'd like to see some code.
Normally I'd use border-width: 0px but as we know IEx (especially 6) has extremely odd quirks with CSS, so idk if this will work the way you want.
You could also try setting the border-color: to the same color as the background of the page. Just to be safe I'd do both, so if it ignores one it should still get the other.
border: solid #FFFF00 0px;
OK I have fixed my border problem
I also found another problem, that is with the fact that XHTML strict 1.0 dosn't allow IFRAMES so, instead u have to use the mighty <object> tag.
IE7 has a bug that won't let it use the parent object when a page is in an <object> tag :-(
So after allot of muttering four lettered words directed at a certain computer company, I have got a solution to both my probs: -
As you can see it uses the proprietary if ie comment thingy to process an old-school IFRAME with a frameborder attribute and still allows me to have half-decent markup.
<!-- GUESS WHAT: IE DOSN'T HAVE GOOD ENOUGH SUPPORT FOR THE OBJECT TAG TO REPLACE IFRAME TAGS :-(
SO WE HAVE TO USE THIS MICROSOFTY STYLE HACK TO GET IT WORKING WITH A
NON-STANDARD IFRAME, AND YES THE FRAMEBORDER IS NEEDED FOR IE7 COMPATIBILITY! -->
<!--[if IE]><iframe id="frameUpload" src="upload.php?uploadTo=download&r=<? echo rand() ?>" style="height:70px; width:70px" frameborder="0">
<!-- NOW THE CORRECT WAY OF DOING THINGS -->
<!--[if !IE]> <-->
data="upload.php?uploadTo=download&r=<? echo rand() ?>"
style="height:70px; width:70px; border-style:none" type="text/html"></object>
Please note that I am attaching a random number to the query string for the url for the sub-page, this is to work around browser chaching issues (mostly IE again).
P.s. this is used for a file upload withing an AJAX project and it work pretty damn good!
Very good info. Thanks for taking the time to post your solution.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)