Why won't CSS rollovers work for me?
September 25, 2008 3:16 PM
Subscribe
I'm trying to put CSS rollover buttons onto my website. They show up just fine in Dreamweaver, but not on
any browser. This makes no sense, about to go insane, more inside, etc.
Alright, I hope someone here can help me.
I'm trying to put some CSS rollover buttons on a page, as so . . .
[MeFi is stripping out my HTML code, but it's basically a link--a href--with a class tag (="artisticroll") and some style for positioning.]
Note: I'm positive that there's not an error in this code.
. . . and this links back to my .css file, part of which is thus . . .
a.artisticroll
{
display: block;
width: 200px;
height: 23px;
background-image: url('artisticROLL.jpg');
}
a.artisticroll:hover
{
background-position: 0 23px;
}
. . . but it only shows up in Dreamweaver--not in any browsers. I've tried doing a local preview as well as actually uploading all the files onto my host and viewing it online. Nothing works.
This isn't the weird part. What's stranger is that I have other CSS rollover buttons on the same page that work just fine.
Code / .css except for working buttons:
[Same issue/code as above, except the class is "contactroll".]
a.contactroll
{
display: block;
width: 130px;
height: 60px;
background-image: url('contactROLL.jpg');
}
a.contactroll:hover
{
background-position: 0 60px;
}
As far as I can tell, there is absolutely no reason for some buttons to work and some not. What am I doing wrong?
Thanks for any/all help; I can provide more details if needed.>>
posted by reductiondesign to computers & internet (18 comments total)
1 user marked this as a favorite
background-positionvalues has any effect?posted by theiconoclast31 at 3:29 PM on September 25, 2008