2 replies [Last post]
Robse
Offline
newbie
Last seen: 16 years 34 weeks ago
Joined: 2004-02-28
Posts: 2
Points: 0

I use jpegs for custom graphical table borders, like this:

td.myTable-top {
height: 15px;
background-image: url(../images/framepix/top.jpeg)
}

<table class="myTable" >
<tr>
<td class="myTable-top"></td>


How can I make the page wait for display, until all the .jpegs have loaded?
I know how to do this with HTML, IMG f.i. using a JS, but with a css?

Daybreak_0
Offline
Enthusiast
Sydney, Australia
Last seen: 16 years 49 weeks ago
Sydney, Australia
Timezone: GMT+10
Joined: 2003-11-15
Posts: 389
Points: 0

Preload graphical Tableframes

You say you can already do it with html. I can't see any reason it should not work again, but I suppose it depends on how that code works.

Regards
Day

The only way to learn is to do it yourself

Robse
Offline
newbie
Last seen: 16 years 34 weeks ago
Joined: 2004-02-28
Posts: 2
Points: 0

Preload graphical Tableframes

Thanks for your reply.

Well the function is a standard one for preloading IMG's. It does so
by creating a reference to an IMG with the JS New Operator, and
then specifying the source, e.g.:

picture = new Image (10, 10);
picture.src = 'pic.gif';

Then in HTML to get the picture:

<IMG SRC="pic.gif" WIDTH="10" HEIGHT="10">

But I can't get it to work with the CSS Images.
You can't say

picture = New background-image

Can you? And if so, how would I then get the pic into the CSS class in
my HTML? Anyway I'm a little confused, can you give me an example of
how this is supposed to work?