Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

basic img image-background issue

Status
Not open for further replies.

evaleah

Programmer
Mar 18, 2003
252
US
I have a simple html img control I would like to add a background image to on an ASP.NET webform. I have the following but the background image does not show. The image being referenced is there. I can see it in the second image control. I just don't see it as a background. Any ideas?

<img id="htmlImg" style="background-image: url('physicianGraphic.jpg'); background-position:top center;" src="uploadedimages/Member_Photos/adkins.jpg" alt="Doc Photo Test" />

<img id="Img1" src="physicianGraphic.jpg" alt="Doc Photo Test" />

Thanks!
 
Your background image is in the background of the image tag, while in the foreground (src) of the same tag, you have another image. How do you expect to see the image, if you put another image over it?

Simply put an element, like a div, with dimensions of the physicianGraphic.jpg image and put it in the background of that.

[small]Do something about world cancer today: Comprehensive cancer control information at PACT[/small]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top