Forum Moderators: open

Message Too Old, No Replies

I want to slice a table background image :s

         

DarkTruth

3:08 am on Oct 30, 2003 (gmt 0)

10+ Year Member



Ok i know this isn't possible but what are my alternatives...
This is how my site works. I make a photoshop file with 750x500 pixels...

I make a good looking background (I edit a picture) with place for my text. I put my background in a table 750x500 and I align the text for it.

Now my problem is it takes +- 5 seconds to load that image.. meanwhile my screen is black (black background black text)

SO i want to slice my image. I know how to slice but how can I have multiple parts as a background...

I'm thinking about putting pieces in the td tag but td background = not valide html....

How would you solve this problem?

tedster

5:32 am on Oct 30, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Use CSS for a valid approach -- table cells can take a background-image: attribute in CSS. If you don't have an external css file (highly recommended, btw) you can also use an inline CSS approach by adding the following attribute to your <td> element:

<td style="background-image:url([path to image]);">[cell content]</td>

Place the path to your image inside the parens, without any quotes surrounding it.

jetboy_70

12:53 pm on Oct 30, 2003 (gmt 0)

10+ Year Member



Other than not having huge images as table backgrounds ...

Similar to Tedster's comment, try:

style="background: #FFFFFF url([path to image]);"

which will make the table background white (and thus make your text readable) *until* your image loads in.

Cosmin

1:00 pm on Oct 30, 2003 (gmt 0)

10+ Year Member



What about inserting this into the body so your image it loads right away:

<body bgcolor="#.... topmargin="0"........onLoad="MM_preloadImages ('images/backtable.gif)">