How Does A IFRAME Work?

SpaceshipSpaceship
SpaceshipSpaceship
Spacemail by SpaceshipSpacemail by Spaceship
Watch

spy69

VIP Member
Impact
15
Can someone tell me how does IFRAME work? I have a template for my site but the template is too short lenght wise so when i type longer the images get disorrted because the template is made of images just placed together. How would i use an IFRAME to make it look normal?

Thanks A Milllllllll
Spy
 
0
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
An iFrame wouldn't do what you want, your layout shouldn't be broken if you just type stuff in it.

Remember that if you want to put text over the top of an image you need to make the image a backgroiund.

Could you show us your site?
 
0
Close
I'm not sure exactly what you are saying, but an IFRAME is inserting another page into the base of you main page. Sort of like its own content box, that can be scrolled and everything. If you have many images you people to be able to scroll through, an Iframe would be a good idea.
 
0
Close
An iframe works like this:

- you set a specified width and height
- you can bring up another html page into that frame

iframes are awful though. Some browsers can't handle them, and they are tacky. I try to steer clear of them. You may only have this choice though.

Here is how an iframe would work:
Code:
...<tr>

     <td>
          <iframe style="width: WIDTH_IN_PX; height: HEIGHT_IN_PX;" src="path/to/file.html"></iframe>
     </td>

</tr>...
 
0
Close
The above code insertion actually uses an iframe, so that's an example within itself :)
 
0
Close
I dont know why people insist in using frames when they are so bad

Sorry for the offtopic.
 
0
Close
0
Close
If you just want a scrollbar, don't bother with iframes, just use a div and style it. Iframes confuse search engines. Something like this would work:

The (x)HTML:
Code:
<div id="scroll">
<p>bla bla bla</p>
</div>

The CSS:
Code:
#scroll {
width: somethingpx;
height: somethingpx;
overflow: auto;
}
 
0
Close
Thanks Everyone for you reply, ill be to check it out.
 
0
Close
elliothere said:
If you just want a scrollbar, don't bother with iframes, just use a div and style it. Iframes confuse search engines. Something like this would work:

The (x)HTML:
Code:
<div id="scroll">
<p>bla bla bla</p>
</div>

The CSS:
Code:
#scroll {
width: somethingpx;
height: somethingpx;
overflow: auto;
}
wow.. never knew that - dosen't matter though, I hate <divs> as much as <iframes>. Is that examle possible with tables?

Code:
...<td id="scroll">...</td>...
Code:
#scroll {
width: somethingpx;
height: somethingpx;
overflow: auto;
}

will have to try that out sometime! :) Thanks

I hope you find what you are looking for spy69! :D

Tom
 
0
Close
Yeah, it should be possible with tables.
 
0
Close
i hate iframes lol, use php, the nice include function

Code:
<?php
include "blah.html";
?>
 
0
Close
Mystic said:
i hate iframes lol, use php, the nice include function

Code:
<?php
include "blah.html";
?>

Indeed, that's the best way. Ever. It's faster and easier to handle. It works well with image layouts as well. :)
 
0
Close
Mystic said:
i hate iframes lol, use php, the nice include function

Code:
<?php
include "blah.html";
?>
but it will still increase the size of the page downwards. This is not what is wanted. spy69 needs something where it will have a scrollbar, so that his slayout isn't ruined.
 
1
Close
yeah thanks all especially doggie, but yeah its crap so im having a new template done.

Spy
 
0
Close
Appraise.net

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

Switch between accounts
You can now stay logged in to more than one NamePros account in the same browser. Click your avatar, then "Accounts in this browser", to...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back