Link to home
Start Free TrialLog in
Avatar of muso120999
muso120999

asked on

How to change default browser background colour/frame bg color?

I have a website that uses quite a bit of graphics, and is predominantly black.

The problem I want to sort out is that between the pages loading (within a frameset) there is a white flash (or whatever default background colour the user has set).

So quite simply, is there a way of preventing this flash?  

In theory I would have thought it possible to set something within the frameset page to change the overall background colour to black, like on the contained pages, but nothing seems to work!
Avatar of Timbo87
Timbo87

That's simply IE's loading screen and there's really nothing you can do about it. :(
Avatar of muso120999

ASKER

I guess I maybe didn't explain my problem too well.

The site loads up within a letterbox frameset, with plain black html pages top, bottom, left and right.  The content goes in the middle.

So, the problem isn't actually IE showing a blank window before it loads a page, but that it shows the colour of the browser through the frameset (index) page while the centre page re-loads.  AFAIK there isn't a bgcolor property for the <FRAME> or <FRAMESET> tags which might have solved it.
Have you tried adding
<body bgcolor="black"></body>
after the frameset?
Yes, it doesn't work either!
Avatar of seanpowell
You're using the correct frameset placement, yes?

<frameset rows="200,*">
  <frame name="contents">
  <frame name="main">
  <noframes>
  <body bgcolor="#000000">
  <p>This page uses frames, but your browser doesn't support them.</p>
  </body>
  </noframes>
</frameset>
Use an iframe or a frameset like this:

<frameset rows="150,*,150">
  <frame src="top.html">

  <frameset cols="150,*,150">
    <frame src="left.html">
    <frame src="content.html">
    <frame src="right.html">
  </frameset>

  <frame src="bottom.html">
</frameset>

Personally, I would go with a single iframe:

<html>
<head>
<style>
  body  {background-color:#000;}
  #myIFrame {position:absolute; top:15%; left:15%; width:70%; height:70%;}
  /* (2 X 15%) + 70% = 100% */
</style>
</head>
<body>
<iframe id="myIFrame" src="content-page.html">Sorry, your browser doesn't support inline frames...</iframe>
</body>
</html>

This is much cleaner code, and the iframe will resize itself according to the size of the user's browser window.
Thanks Zontar, it is certainly a good suggestion to try iframes.  Unfortunately this still has the same problem!

In testing this, I have changed my Windows settings to have window backgrounds a lurid green.  There are a couple of pages within the main content that have a fair bit of graphics that link to each other, and, especially before the pages are cached, there can be quite a long flash of green!

Oh, on your example of an iframe, I had to use a single-cell table (100% high and wide) with the iframe floating in the centre, as the frame needs to be a fixed size of 760x430.

I think the problem may indeed be fundamental to the way (IE) frames are drawn on the screen, and I also realise that the question may well appear excessively pedantic (as, indeed, it is!).

So, are there any more suggestions, or is my task futile!
In the Main HTML which contains the frames .
have you tried to put there a bgcolor ?

If not try !

If still not working then try adding an image as a background.
But the image is only a pixel of black !
In your case it is black if I understand all right .

Then if this didn't work POST back and I'll try to think of any other solutions.

regards !
Thanks Yavor_01126,

I'm afraid it does the same with your suggestions too!
PLS provide me a URL !
Can't help when just reading a text .

10x !!!
ASKER CERTIFIED SOLUTION
Avatar of seanpowell
seanpowell
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hmmm if this is a major problem you can try adding flash.
Add isn't the right word because your site contains frames .
So BUILD the whole page in FLASH shouldn't give any white flashes but it is a matter of time to rebuild.

You can still try to make the problematic frame only in flash or maybe to add an applet which makes loades and whatever it does.

But it still require more than a single line of code or a paint brush !

Regards !
Thanks for everyones help here.

I have decided to award the points to georgemarian, as he correctly identified what the main problem is (ie the pages are cumbersome), and has hinted at a practical solution (Flash would undoubtedly work, but I feel is a little out of budget!).  I'm still not sure at this moment how well an onLoad would work, but georgemarian at least indicates that the crux of the problem is that something needs to load quickly - before the main content.
Thanks - I'm glad we were able to help you along. And best of luck with the project!