help with iframe properties

General software, Operating Systems, and Programming discussion.
Everything from software questions, OSes, simple HTML to scripting languages, Perl, PHP, Python, MySQL, VB, C++ etc.
Post Reply
User avatar
catngo
Regular Member
Posts: 213
Joined: Mon Dec 11, 2000 12:00 am
Location: Oklahoma City

help with iframe properties

Post by catngo »

what's the code to make anything (images) display inside iframe centered and change iframe background color instead of white
User avatar
TonyT
SG VIP
Posts: 10356
Joined: Fri Jan 28, 2000 12:00 am
Location: Fairfax, VA

Post by TonyT »

an iframe is a separate web page, just use standard html for the page that gets displayed in it:

<html>
<head>
<title></title>
</head>
<body bgcolor="blue">
<p>your content</p>
</body>
</html>

see this page of mine re iframes:
http://www.coolpagehelp.com/inline.html
No one has any right to force data on you
and command you to believe it or else.
If it is not true for you, it isn't true.

LRH
User avatar
catngo
Regular Member
Posts: 213
Joined: Mon Dec 11, 2000 12:00 am
Location: Oklahoma City

Post by catngo »

thanx for your help. i know how to use iframe. I have iframe work as a display monitor to display image that other link send to it. The problem is i image diplay in iframe not centered. if a page display in it, i can format the page to show as i wanted inside iframe, but i have no control over images. Also, when the image display, it the extra background is white cause image itself can't take any html code (<bgcolor="soso">). check out my website and you'll know what i'm talking about.
User avatar
TonyT
SG VIP
Posts: 10356
Joined: Fri Jan 28, 2000 12:00 am
Location: Fairfax, VA

Post by TonyT »

I see what you mean.
Because the images are not all the same size, the bgcolor is default to white. And when linking directly to an image file, it will by default be displayed at position top o and left 0. (top left corner)

I see you are using PHP. You could probably use PHP to have the images in iframe get written to the page automatically, and control the bgcolor an dposition of images (center).

Search teh PHP script web sites and look for a PHP slideshow application. Then you may be able to edit the php file to target the iframe.
No one has any right to force data on you
and command you to believe it or else.
If it is not true for you, it isn't true.

LRH
Post Reply