4 replies [Last post]
abeall
Offline
newbie
Last seen: 10 years 37 weeks ago
Joined: 2005-09-24
Posts: 10
Points: 0

Without going into detail about the layout, I want to have a div/cell that has a tiling background image, but also the top part needs to be different(a background image with no-repeat). Imagine a div/cell with a tiling background, and an image on the top which blends in seemlessly. That's the effect I'm going for, but I don't wan to use an image, I want the browser to be able to shrink the div/cell if need be. Is there any way to have two backgrounds? I'm kind of stumped...

Thanks in advance.

n8gz4ez
n8gz4ez's picture
Offline
Leader
Last seen: 10 years 45 weeks ago
Timezone: GMT-6
Joined: 2005-06-13
Posts: 802
Points: 0

2 backgounds? or something similar?

For sure. I might go about it this way:

CSS:
div {
  background-image: url(div_tile.gif);
}

h1 {
  background-image: url(h1_tile.gif);
  background-repeat: repeat-x;
}

HTML:
<div>
<h1></h1>
</div>

This is my big chance . . . yep, I blew it . . .

abeall
Offline
newbie
Last seen: 10 years 37 weeks ago
Joined: 2005-09-24
Posts: 10
Points: 0

2 backgounds? or something similar?

Thanks for the reply.

I found that placing a div in the top of the cell(yep, sorry... I'm using a table... just one, I promise!) and setting the div to have a background image, then let the cell background image tile, gets the effect perfectly as desired, and works in both IE and Moz. The div seems to inherit the cell width, and since it's all background based the width will shrink as desired if the browser is small.

I'd love to share the layout. Check back at abeall.com to see it soon. Laughing out loud

Cheers

[edit]
n8gz4ez -
Thanks, that's slick.

n8gz4ez
n8gz4ez's picture
Offline
Leader
Last seen: 10 years 45 weeks ago
Timezone: GMT-6
Joined: 2005-06-13
Posts: 802
Points: 0

2 backgounds? or something similar?

Great, I hope it works out for you. Smile That "Scatter" hand is really intense. Shock

This is my big chance . . . yep, I blew it . . .

abeall
Offline
newbie
Last seen: 10 years 37 weeks ago
Joined: 2005-09-24
Posts: 10
Points: 0

2 backgounds? or something similar?

> That "Scatter" hand is really intense.
I made that for a local eye-doctor. He gets lots of business now. Wink