tags:

views:

45

answers:

2

Hello,

Example code:

<div class="ex">Bla bla bla bla</div>

In the top will be background-image and after when it'll finish display the background-image it'll disply a background-color.

Somthing like that:

[Image] text
[color] more text
[color] mor text..

How do I do it with CSS?

Thank you.

+2  A: 
background: url("img/folder/file.jpg") repeat-x #000000;

Change the hex to whatever color you need.

bradenkeith
And if i want in the bottom another background-image? can I do again (after the color) "url("img/folder/file.jpg") repeat-x" ?
Luis
In CSS3 there's an easier way to do it but you run into compatibility issues there. You'll need to put a div inside that div `<div class="ex"><div class="child_ex"></div></div>` - set up background properties for child_ex and now you have an another background.
bradenkeith
A: 

try to use background image repeat property:

background-repeat: repeat | repeat-x | repeat-y | no-repeat
Vaibhav Gupta