Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IFRAME border 1

Status
Not open for further replies.

jammer1221

Programmer
Jul 30, 2003
352
US
Hi, I was wondering if it was possible to hide the border of an Iframe. Preferibly in all browsers but right now any way in any browser will work...Thank you very much.
Jammer1221
 
In the style for the iframe, specify "border: 0px".

Kevin
A+, Network+, MCP
 
emm that didnt work for me...maybe i Just wrote the code wrong...
Code:
 style="border: 0px"
I alos tried this
Code:
<style>
iframe {
border: 0px
}
</style>
But that didnt work either...so Maybe could ya write the script you were talkin about for me...Thanks Alot
Jammer1221
 
Strange, is the iframe inside something with a border, like a div? I have an iframe on one of my pages and specified a border of zero for it and it displays without a border. Do you have the page somewhere I could look at or could you post the code for it?

Kevin
A+, Network+, MCP
 
Yes the iframe is inside a <div> tag...i created a 'box' sort of thing using CSS and I used a div tag to call it, and yes I do have a 'testing' page you could look at.
go here and type in jammer1221 for the user name.
Thanks for you help
Jammer1221
 
Hmm, maybe the content on the page in your iframe is too big. I have all the content in mine in a div that set to 100% width and height.

Kevin
A+, Network+, MCP
 
I may have to kick myself. That's the way to do it, iggit. Though setting the style for border=0 for the iframe does do it for some browsers (not IE), frameborder is the reliable method.

Kevin
A+, Network+, MCP
 
ok so your saying that i can just put border=&quot;0&quot; in the iframe tag but it won't work in IE ?
Jammer1221
 
Just do what iggit said and put frameborder=&quot;0&quot; in the iframe tag. It'll work in IE. What won't work in IE was what I was suggesting before, putting 'border: 0' for the iframe's style.

Kevin
A+, Network+, MCP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top