开发者

CSS background image for asp button control

I've been stuck on this for 3 days now. I have two pages that basically share some code for a search feature on my website, here's my code

The CSS

#btnSearch {
    display: block;
    color: #ffffff;
    width: 100px;
    height: 27px;
    border: 0;
    padding: 0;
    background: transparent url("Images/btnSearch2.png");
}

When I'd gotten the one page working, I copied that code to the page where it doesn't work, but it hasn't made any difference, here's the HTML (don't worry about the inline css, that's just for convenience while I'm working on it...)

EDIT1: All other classes work correctly as they (along with开发者_如何学JAVA the css above) come from a stylesheet at <webroot>/App_Themes/Default... The images go in a subdirectory of this location.

I don't see why this code works on 1 page and not the other when all the other CSS classes work on both pages...


Have you tried the absolute image path and see if it works that way?


Maybe it´s a Browser problem: Try to open the file that doesn´t work in another browser.

Maybe you have a tag named the same way #btnSearch in the pages where the styles don´t apply.


Is the path to the background image correct for the page where the code doesn't work? Or even the path to the CSS file?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜