HTML Tutorial


 Forum HomeForum Home   FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
RegisterRegister - Not registered yet? Got something to say? Join HTML Code Tutorial!
how to format frame border of <iframe>?
Post new topic   Reply to topic    HTML Help Forum Index -> HTML Frame
View previous topic :: View next topic  
Author Message
ron wolpa



Joined: 28 Feb 2005
Posts: 5

PostPosted: Mon Feb 28, 2005 7:28 pm     how to format frame border of <iframe>? Reply with quote

<IFRAME style="WIDTH: 490px" src="anything.htm"

frameBorder=1

scrolling=no height=80 > </IFRAME>

Hi
Is there a way to format the border of iframe so that instead of having the uggly 3d default I will have a thin flat colour finishment line ? Question
is there a way to control this by means an external CSS ?
Cheers
ron wolpa



Joined: 28 Feb 2005
Posts: 5

PostPosted: Wed Mar 02, 2005 7:40 pm     Reply with quote

Hey , any answer ?? Question Exclamation
degsy



Joined: 23 Feb 2005
Posts: 2440
Location: North East, UK

PostPosted: Thu Mar 03, 2005 5:37 am     Reply with quote

You can add a border but the style is defined by the Operating System style.

http://www.w3schools.com/css/
henkied



Joined: 07 Mar 2005
Posts: 22

PostPosted: Mon Mar 07, 2005 2:45 am     add a border Reply with quote

you can add a border most browser wil show it

style="border:1px solid #000000"
wil replace the 3d border with a black one of 1 pixel

make it 0px to completely remove the border
mackaltman



Joined: 09 Sep 2005
Posts: 1

PostPosted: Fri Sep 09, 2005 8:44 pm     THE ANSWER Reply with quote

In an iframe you remove the iframe border (browser border) by placing a tag as follows:

<iframe frameborder="#"></iframe>

# = 1 for yes, and 0 for no

You're welcome, as well as the rest of you who should be thanking me, 3d borders suck so get rid of all of them.
skhambadkone



Joined: 22 Aug 2008
Posts: 1

PostPosted: Fri Aug 22, 2008 1:45 am     Reply with quote

mackaltman,

I wasted my time registering on this site just to thank you. Thank you.
sticks464



Joined: 31 Dec 2006
Posts: 1283

PostPosted: Fri Aug 22, 2008 4:01 am     Reply with quote

Sorry to hear you didn't find a satisfying answer to your question.

To style an iframe border the first thing to do is remove the border elements from the html and the height may be removed
Code:
<IFRAME style="WIDTH: 490px" src="anything.htm"
scrolling="no"></IFRAME>


If you want inlne css it can be styled as such
Code:
<IFRAME style="width:490px; height:80px; border:1px solid #000000;" src="anything.htm" scrolling=no></IFRAME>


If you want embedded css you must give the iframe an id or assign a class. Either one is fine and will do the same thing with the exception of id's may be used only once per page and a class may be repeated.

Embedded css goes in the head section of the page
Code:
(using an id)
<IFRAME id="myframe" src="anything.htm" scrolling=no></IFRAME>
 
<style type="text/css">
#myframe {
width:490px;
height:80px;
border:1px solid #000000;
}
</style>


Code:
(using a class)
<IFRAME class="myframe" src="anything.htm" scrolling=no></IFRAME>
 
<style type="text/css">
.myframe {
width:490px;
height:80px;
border:1px solid #000000;
}
</style>
Display posts from previous:   
Post new topic   Reply to topic    HTML Help Forum Index -> HTML Frame All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
HTML Help Archive
Powered by phpBB © 2001, 2005 phpBB Group
HTML Help topic RSS feed 

 
HOSTING / DESIGN
MAKE MONEY

Home
  |   Tutorials   |   Forum   |   Quick List   |   Link Directory   |   About
Copyright ©1997-2002 Idocs and ©2002-2007 HTML Code Tutorial