The iFrame contents
Understanding the iFrame code
Okay now step 2, for this we go to the page we called FrameA
On this page you put the objects (text, images etc.) you want to show up in the iFrame on your first page.
Drag a text object on and put in any text you want just so we can see this work. Since I made our example iFrame 500 wide (pixels) lets make the text object 470 wide that will leave at least 25 pixels for the vertical scroll bar.
Once you have your text finished, right click on it and in the general tab again for
size
put in 470 wide.
Put the text box (or any objects) in the top left corner of the page, this is the section that will be seen in the iFrame.
If the iframe is 500 wide and 100 high it will show 500x100 pixels from that top left corner.
That's it, press f5 to preview the site
Replace:
(i)
with the "url" of the page you want to show by default in the iframe in this example we used FrameA you can use anything you want to here. It's just another page you've made in web studio, but it has to be exactly as written, if there is a space use an underscore like this: "WS4 Frame" the link would be WS4_Frame.html
(ii)
with "name" the name of your iframe this too can be anything you want. I usually keep it simple like "A" or "1" something like that since it is used for the target=" " code we'll look at later for doing special kinds of links.
(iii)
with either 'auto' or 'no' depending if you want a scroll bar in your iframe or not
(iv)
&
(v)
with a number that you want the width & height of your iframe to be (it will be in pixels)
(vi)
with a number for the width if you want a border around youriframe (calculated in pixels). IE only if you want a frame border color in
Put in '0' if you don't want one.
BONUS
: style="
border
:
solid maroon 3px
"
This is a css trick I found to allow you to put a border around your iFrame if you want one. It works the same as all the other borders I've shown you, pictures, text any object basically...
solid maroon 3px
that's "
border type
|
color
| and
width
You can see more border types below right, if you don't want a border just leave this part of the code out.