Results 1 to 9 of 9

Thread: iframe color

  1. #1
    Join Date
    May 2007
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default iframe color

    I'm using an iframe for a photo gallery. The website is black and when an image comes up that is smaller than the frame there is white all around it. Is there a way to have the excess space around the image black?

    Bigblock

  2. #2
    Join Date
    Mar 2007
    Posts
    51
    Thanks
    18
    Thanked 1 Time in 1 Post

    Default

    I just happen to be looking for the same thing and found this thread.
    IFrame scroller/Change scrollbar style/colour? 10-12-2004, 07:25 AM
    May I suggest that you do a search for this thread and read the articles. I hope this solves your query (and mine).

    The bottom paragraph is interesting:

    <style type="text/css">
    body {
    background-color=#777777;
    scrollbar-base-color:#44444;
    scrollbar-face-color:#777777;
    scrollbar-arrow-color:#bbbbbb;
    </style>

    Change the colors to anything.
    just mess around with it.

  3. #3
    Join Date
    Mar 2007
    Posts
    51
    Thanks
    18
    Thanked 1 Time in 1 Post

    Default

    Further to the above this DynamicDrive code from the CSS Library works great for changing the color of scrollbars. However, it does not affect the color of the frame, title bar or status bar. Pity! Here I am still searching and experimenting.
    <style type="text/css">
    <!--
    BODY{
    scrollbar-face-color:#75EA00;
    scrollbar-arrow-color:brown;
    scrollbar-track-color:#EEEEEE;
    scrollbar-shadow-color:'';
    scrollbar-highlight-color:'';
    scrollbar-3dlight-color:'';
    scrollbar-darkshadow-Color:'';
    }
    -->
    </style>

  4. #4
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    TimeTracker: The css code you posted only works in IE (Internet Explorer) and only affects the scrollbars (as you have already said). There is no css or javascript code that could manipulate the way the end user sees the Title or Status Bar of the browser. There are several threads about why you shouldn't try to "take over" the browser with your design, and to only use the defined amount of space in the browser window. Have a look through those.

    Hope this helps.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  5. #5
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,997
    Thanks
    43
    Thanked 3,198 Times in 3,160 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by bigblock View Post
    I'm using an iframe for a photo gallery. The website is black and when an image comes up that is smaller than the frame there is white all around it. Is there a way to have the excess space around the image black?

    Bigblock
    The display behavior of an image itself (one not on a page) inside an iframe varies significantly among browsers. For consistency, the image in the iframe needs to be on a page in the iframe. You can then set the background color of that page to whatever you like, including transparent. For transparency to work for this in IE though, the iframe must have its allowtransparency attribute set to true.

    Code:
    <iframe allowtransparency="true" src="photo1.htm" width="300" height="300" scrolling="auto" frameborder="1"></iframe>
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  6. #6
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,997
    Thanks
    43
    Thanked 3,198 Times in 3,160 Posts
    Blog Entries
    12

    Default

    I was thinking about this a bit more. If you don't want to make a page for each image, you could do something like so:

    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
    <html>
    <head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <style type="text/css">
    body {
    color:#cccccc;
    background-color:black;
    }
    a {
    color:#cccccc;
    }
    </style>
    <script type="text/javascript">
    function pageIt(el, im){
    if(document.all){
    var f=window.open('',el);
    f.document.write('<body style="background-color:transparent;"><img src="'+im+'"><\/body>');
    f.document.close();
    return false;
    }
    return true;
    }
    if(document.all)
    onload=function(){pageIt('bob', 'photo1.jpg')};
    </script>
    </head>
    <body>
    <iframe name="bob" allowtransparency="true" src="photo1.jpg" width="300" height="300" scrolling="auto" frameborder="1"></iframe><br>
    <a href="photo2.jpg" target="bob" onclick="return pageIt(this.target, this.href);">Photo 2</a>
    </body>
    </html>
    Last edited by jscheuer1; 05-20-2007 at 05:51 AM.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  7. #7
    Join Date
    Mar 2007
    Posts
    51
    Thanks
    18
    Thanked 1 Time in 1 Post

    Default

    John: So I found out. However, for my purposes IE 7 is proving ideal. With full screen there is no title bar nor status bar to worry about and the scrollbars have been coloured. I have also been able to combine an iframe script with a scrolling script and then color the borders, even black them out. The effect is stunning and very practical and works in Mozilla 1.5, Netscape 7 and IE 7. Furthermore I can set a dozen links or more to fill the iframes (absolute popup) one at a time (jtricks.com).
    The purpose of the 'darkness' is to highlight the effect of the binary slides, now seen through a viewer with a glossy interior (so there is no real darkness). Thanks to your help it is now possible for me to create my own stem cells using the energies of time. I am now in day 42 of the treatment program and know that it is working. People can see the results already. Until patents are in place the how will remain my secret.

  8. #8
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,997
    Thanks
    43
    Thanked 3,198 Times in 3,160 Posts
    Blog Entries
    12

    Default

    Very interesting. I hope that you are also under a doctor's care.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  9. #9
    Join Date
    Mar 2007
    Posts
    51
    Thanks
    18
    Thanked 1 Time in 1 Post

    Default

    Actually, John, I am not under any doctor. This is not something they understand, nor are they qualified to advise, since it is completely new and pioneering research. However, I am in touch with the federal minister for health's office. My scoliosis is almost gone, a spoon back disappearing and along with it lumbar pain. Yesterday I spent over forty-five minutes in a dentist's chair and experienced no dizziness nor fainting. I was able to get up and go home like I used to do when I was a young man. For the past week I have slept without a neck support collar, to which I was a prisoner for over six years. On Thursday I start Stage Four of the treatment, learning as I go.
    In forty five days some amazing things have happened. Probably the next time I visit my doctor will be to tell him I am cured of arthritis and a wry neck. I certainly am looking forward to it. Here there are no drugs involved, no invasive medical procedures, no negative side effects and it is completely DIY. Each day I thank the Lord for restoring my health. Cheers.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •