Can't get 'no-repeat' to work.

edited May 2007 in Style Development
I've replaced the bottom right corner image of Ubuntuforums.org, but can't get it to not repeat in Stylish. ...It works in the Web Developer extension.

Code:

#bottom-right {
width:13px !important;
height:33px !important;
background-image:url(http://img.photoamp.com/i/c2EaYu9.jpg) !important; background-repeat:no-repeat !important;
position:absolute;
bottom:0;
right:2px !important;
z-index:7;
}

I've tried everything I could think of.

Comments

  • Works for me, although it's a few pixels off. Try adding some more !important's on those declarations.
  • edited May 2007
    Thanks, Valacar. It worked.

    ...I thought I tried that already...

    I also thought that with CSS you can change one thing (as long as you used '!important'), and leave the other declarations at their default value, as long as they didn't interfere with your change. :| ???

    ...If I am correct, what of these declarations interferes with my 'no-repeat' declaration?

    *brainstorming CSS noob*
  • Posted By: Sasani07I also thought that with CSS you can change one thing (as long as you used '!important'), and leave the other declarations at their default value, as long as they didn't interfere with your change. :| ???
    Are you asking if you can leave off the !important part if the site doesn't use it? For example, if the site doesn't use set the z-index, there's no need to add !important to override it? To be honest, I don't know for sure, but when it comes to user styles, I think it's best to always add an !important onto everything...even if you think it's not necessary.
    Posted By: Sasani07...If I am correct, what of these declarations interferes with my 'no-repeat' declaration?
    I didn't get to see what the problem was, since it looked fine to me. You had !important on both of the background declarations, so nothing should interfere with those, unless background-position or something was set. Using the shorthand method would probably be a good idea...that way any properties you don't set will be set to their defaults.

    background: url(http://img.photoamp.com/i/c2EaYu9.jpg) no-repeat !important;
    which equates to:
    background-color: transparent !important; background-image: url(http://img.photoamp.com/i/c2EaYu9.jpg) !important; background-position: 0 0 !important; background-attachment: scroll !important; background-repeat: no-repeat !important;
  • I believe I tried using the shorthand method. ...Nothing seemed to be working right with stylish yesterday. It must've been me.

    Thanks for your help. ^_^
Sign In or Register to comment.