r/csshelp • u/dehydro • Apr 15 '15
Resolved Customizing the "My Subreddits" drop-down arrow. NSFW
Subreddit: NSFW /r/holdthemoan
Stylesheet: /r/holdthemoan/about/stylesheet
Re: http://reddit.com/r/csshelp/comments/txq5v/changing_the_color_grey_dropdown_arrow_for_my/
.dropdown.srdrop .selected {
background: url(%%spritesheet%%) no-repeat -120px -100px; width: 11px; height: 6px;
}Issue:
Before: http://i.imgur.com/oZ4IBZ3.png
How would I solve this positioning problem?
Solution:
Well this took a long time but I finally came up with a solution. Since I couldn't position the spritesheet image and the "My Subreddits" text correctly, I decided to make the entire thing an image: https://i.imgur.com/KfyLllF.png. So I got rid of the text with text-indent: -999em;, set padding: 0px; as well as display: block; and placed various margins to position the image exactly as I wanted. This is optional, but I also added a hover effect with:
.dropdown.srdrop .selected:hover {
background: url(%%spritesheet%%) no-repeat -100px -20px; width: 93px; height: 8px;
}Hope this helps someone. Cheers!
9
Upvotes
2
u/Hajson Apr 16 '15
}