c# - Why doesn't the image load when dynamically loading css in asp.net? -
I am loading a CSS file by dynamically building a server tag with a link style.
All the CSS except the image is okay. This optional text shows I'm doing it in the page_load event.
Here is the snippet of my IMG markup:
& lt; Img class = "logourl" alt = "header" />
Here is the CSS for logslr:
.logourl {background-image: url (../images/a-logo.png); Width: 169px; Height: 61px; Margin top: 5px; }
When I right-click on the image and view properties, then this is blank (size, address, etc.).
& lt; Img class = "logourl" alt = "header" />
Does anyone & lt; Img & gt;
Tags can have background-image assets ???? It also does not understand.
According to MSDN, the IMG object does not have this property, so I can say that it is safe to believe that it is not supported in IE.
> Do you really want any period, hyperlink, or some other property where the background image is meant?edit
I just read the answer of Justin Grant. I think you can use a background image on an image tag, but I keep my answer because it is a silly way of doing this. If you want your image to have a frame around, then I'll create a div or duration with a fixed width and height, and inside it will be a little img.
Comments
Post a Comment