Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 2 of 2

Thread: iframes + css

  1. #1
    Senior Member kade119's Avatar
    Join Date
    Feb 2007
    Location
    USA
    Posts
    532
    Member #
    14888
    Liked
    1 times
    to tagert a page that an iframe imports uses css the same way as usual correct?

  2.  

  3. #2
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,694
    Member #
    5580
    Liked
    717 times
    Whatever you target, example: mynextpage.html ...
    that page will have it's own CSS stylesheet.

    iframe is like a separate HTML file within a box.

    You can also put images inside an iframe, in which case there
    are no CSS files. If you want to have an image inside the iframe
    and have a black background behind the image, you could use
    a PHP script.

    Example:

    In your iframe, you target this file: image.php?photo=myhouse.jpg
    That PHP script displays the image along with any CSS you want to have.

    Then, the PHP script called "image.php" would look like this:
    PHP Code:
    <?php
    $photo
    =$_GET['photo'];
    echo
    "
    <html>
    <head>
    <style>
    html, body{
    background-color:#000;
    text-align:center;
    }
    </style>
    </head>
    <body>
    <img src='
    $photo' alt='' />
    </body>
    </html>
    "
    ;
    ?>

    .



Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 07:27 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com