Solved

Background first?

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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Suggested Solutions

This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
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)

773 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