Inline frames

Discussion in 'Windows Desktop Systems' started by RagnaroK, Mar 30, 2003.

  1. RagnaroK

    RagnaroK Must be dreaming...

    Messages:
    673
    Location:
    Australia
    Hi,
    I'm working on a new website, and am just wondering if it is possible to make inline frames (the ones in Frontpage) transparent? Thanks.

    -RaG
     
  2. Kevin Ar18

    Kevin Ar18 OSNN Senior Addict

    Messages:
    300
    Would setting a width and height of 0 or 1 do what you need?



    Find your <iframe> tag

    Then try the following:
    <iframe style="visibility:hidden">
    That should make it disappear. However the space that the iframe takes up will still be there.

    Alternatively, if you want it to appear as though the iframe was never there, try this:
    <iframe style="display:none">
     
  3. RagnaroK

    RagnaroK Must be dreaming...

    Messages:
    673
    Location:
    Australia
    No, that's not what I wanted. You see, I want to make the iframe transparent so I can see the background picture behind it (like an alpha), and yet still allowing whatever is in the iframe to be seen (text, pictures, whatever). Is it possible to do what I want? Thanks for your suggestion though.
     
  4. SPeedY_B

    SPeedY_B I may actually be insane.

    Messages:
    15,800
    Location:
    Midlands, England
    I think what you'll need to do, it cut the image up and set the iframe background to a part of the image.
     
  5. RagnaroK

    RagnaroK Must be dreaming...

    Messages:
    673
    Location:
    Australia
    o.0
    I didn't think of that. Thanks SPeedY_B. But isn't there any HTML coding or anything that can accomplish what I want? It's just SPeedY_B's method is a bit tedious. :huh:
     
  6. Zedric

    Zedric NTFS Guru Folding Team

    Messages:
    4,006
    Location:
    Sweden
    Not with a (i)frame afaik. Maybe if you used a layer instead (<DIV>).
     
  7. RagnaroK

    RagnaroK Must be dreaming...

    Messages:
    673
    Location:
    Australia
    :(
    Ah well... thanks anyways. <DIV>?
     
  8. Zedric

    Zedric NTFS Guru Folding Team

    Messages:
    4,006
    Location:
    Sweden
    Yeah <DIV> is the tag you use if you want to do layers. Netscape has an old <LAYER> tag too, but only Netscape support it afaik.
     
  9. jonifen

    jonifen pffff...

    Messages:
    705
    Code:
    <iframe src="page.html" width="200" height="200" border="0" frameborder="0"></iframe>
    u can change the width/height numbers to whatever (obviously :)) but you need to cut the piece out of the image which would be where the iframe is.

    Ive made a website which I made that demonstrates what you're after I think... http://www.ackclan.org.uk

    I used adobe photoshop 7 and its image slice facility to cut the images up where I wanted them. I put the large bit where the iframe is as the background of the page thats loaded in, and it works ok i think :)


    It really all depends on how you want the stuff displayed... if you want it to extend the page as more text is added, i think a layer would be best... but if you want to keep loads of text in a small space (so the user can scroll), i suppose an iframe is best.
     
  10. RagnaroK

    RagnaroK Must be dreaming...

    Messages:
    673
    Location:
    Australia
    All great solutions, but I think an example is what you need. What I want to do is shown on the picture attached. The text box with the text "Seneste nyt". I want to do something like that but with an inline frame or some sort of other frame so I can display a web page in it. Thanks again all. :)
     
  11. zalood

    zalood OSNN Addict

    Messages:
    177
    Use a style sheet or put STYLE tag in between the HEAD tag.

    <style>
    iframe{
    allowtransparency: true;
    background-color: transparent;
    filter:alpha(opacity=60);
    margin-left:50;
    }
    </style>
    <body background=picture.jpg>

    <iframe FRAMEBORDER="0" BORDER=0 width=448
    height=272 src="anything.htm" name="frame">
    </iframe>
     
  12. Lighter

    Lighter . . . . . . . . .

    Messages:
    229
    Location:
    NYC
    Elegant method, Zalood. Never thought of doing it that way, nor experimenting with the additional style parameters.
     
  13. Zedric

    Zedric NTFS Guru Folding Team

    Messages:
    4,006
    Location:
    Sweden
    Clever. :)

    One thing though, wouldn't the alpha apply to the foreground as well as the background? Just a though.
     
  14. RagnaroK

    RagnaroK Must be dreaming...

    Messages:
    673
    Location:
    Australia
    o.0
    I'll go try that now and I'll message back to tell you guys if it's working or not.