Solved

Background first?

Posted on 1998-07-21
4
140 Views
Last Modified: 2010-04-09
I need to load a background before the text...Is this possible or is there a work-around? Also, (of course) I need it to load quickly.
0
Comment
Question by:davisja
4 Comments
 
LVL 2

Expert Comment

by:SirCaleb
ID: 1844795
What is the size of the image...?k
Also, what is the pixel dimensions...width and height
0
 
LVL 12

Accepted Solution

by:
Otta earned 100 total points
ID: 1844796
> I need to load a background before the text..
> Is this possible?

No. The HTML (Hyper Text Markup Language)
does not allow you to specify the "order" of loading;
it only defines the "final-view".

So, a tag like:

   <body bgcolor="#ffffff" text="#000000"
       link="#000080" vlink="#800040" >

defines a "white" background, with "black" text,
and "blue" links, and "red" visited-links.

> Also, (of course) I need it to load quickly.

Using a "solid-colour" background is much faster
than loading a "background-image".
0
 
LVL 3

Expert Comment

by:bigelos
ID: 1844797
Actually, you might be able to "load" the text after the background using JavaScript.

Here is a little sample - not yet tested, so consider it as pseudo-code.  My connection is too fast to test it - everything appears almost instantly.  At any rate...

<HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
// Here is where you would put your actual HTML.
// It won't be run until the entire file is loaded.
function write_txt(){
    document.write('Write this text');
    document.write('<center><b>Write this other text in bold, centered </b></center>');
}
</SCRIPT>
</HEAD>
<BODY background="your_image.jpg" onload="write_txt()">
</body>
</html>
0
 
LVL 8

Expert Comment

by:jbirk
ID: 1844798
I think a nice way around avoiding text which doesn't read well on white because a background image is used is using BOTH the bgcolor and background attributes of the body tag.  Because like otta said, background colors load quickly, so your color will load quickliy making the text at least readable while a background image is being loaded.  Of course picking a color close to the images color is a good idea too.

Hope this helps,
Josh
0

Featured Post

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

Join & Write a Comment

Introduction The Google Maps API offers various ways to draw dynamic and static maps.  Using a combination of PHP and JavaScript, you can draw active JavaScript maps that allow pan-and-zoom in the client browser window.  You can also draw "static" …
Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
In this tutorial viewers will learn how add a full-size background image to a webpage using CSS3. Create a new HTML document with an internal stylesheet.: In CSS, define the html element to have a background image. Use a high resolution image.: In t…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

744 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

10 Experts available now in Live!

Get 1:1 Help Now