Solved

Background first?

Posted on 1998-07-21
4
141 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
Find out what you should include to make the best professional email signature for your organization.
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

920 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

13 Experts available now in Live!

Get 1:1 Help Now