Solved

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

Posted on 2003-11-28
14
521 Views
Last Modified: 2011-08-18
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!
0
Comment
Question by:muso120999
  • 5
  • 3
  • 3
  • +2
14 Comments
 
LVL 15

Expert Comment

by:Timbo87
Comment Utility
That's simply IE's loading screen and there's really nothing you can do about it. :(
0
 
LVL 10

Author Comment

by:muso120999
Comment Utility
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.
0
 
LVL 15

Expert Comment

by:Timbo87
Comment Utility
Have you tried adding
<body bgcolor="black"></body>
after the frameset?
0
 
LVL 10

Author Comment

by:muso120999
Comment Utility
Yes, it doesn't work either!
0
 
LVL 31

Expert Comment

by:seanpowell
Comment Utility
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>
0
 
LVL 11

Expert Comment

by:Zontar
Comment Utility
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.
0
 
LVL 10

Author Comment

by:muso120999
Comment Utility
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!
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 2

Expert Comment

by:Yavor_01126
Comment Utility
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 !
0
 
LVL 10

Author Comment

by:muso120999
Comment Utility
Thanks Yavor_01126,

I'm afraid it does the same with your suggestions too!
0
 
LVL 2

Expert Comment

by:Yavor_01126
Comment Utility
PLS provide me a URL !
Can't help when just reading a text .

10x !!!
0
 
LVL 31

Accepted Solution

by:
seanpowell earned 250 total points
Comment Utility
There's not going to be anyway to change the default user background as you've probably already guessed - if you have an extremely content-intensive page that needs to download - my best suggestion would be to load a blank html page set to your required background, and then place an onLoad function to call the required document.
0
 
LVL 2

Expert Comment

by:Yavor_01126
Comment Utility
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 !
0
 
LVL 10

Author Comment

by:muso120999
Comment Utility
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.
0
 
LVL 31

Expert Comment

by:seanpowell
Comment Utility
Thanks - I'm glad we were able to help you along. And best of luck with the project!
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now