Background image in datalist

S

Simon Rigby

Hi folks,

I am using a datalist and I want to assign a background-image to the
item style. I see there is no property for this directly so I decided
to css it by creating a css class:

..myDataListItem {
background-image: url(images\fade.jpg);
}

and setting the ItemStyle.CssClass to myDataListItem.

Unfortunately, she no work.

I'm basically trying to apply a jpeg to a background that is a colour
fade from dark blue on left edge to light blue on right.

I'm thinking that maybe I might have to build my own control for this
and override the Render method to get what I want. Any light thrown,
greatly appreicated.

Thanks
 
S

Simon Rigby

Apologies, it was my mistake. The reference to the image directory was
incorrect based on the location of the css.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top