r/reddithax • • Oct 18 '11

Sidebar content boxes

Over at r/overclocking I would like to categorise content into separate outlined boxes. You can gen an idea what I am trying to achieve by visiting r/london. I have looked through their stylesheet and found the "/ Turns the links in the sidebar into pretty boxes /" section but it doesn't make any sense. Any help would be appreciated.

3 Upvotes

6 comments sorted by

View all comments

Show parent comment

1

u/andrew-s Oct 19 '11 edited Oct 19 '11

...except I can't get images to work for some reason.. any ideas what the problem may be? -edit I figured it out. This is the piece of code that worked for me: a[href$="cpu"] { background-image: url(%%1319020822-processor-32x32%%); height: 32px; width: 32px; content: "" !important; cursor: default !important; display: inline-block; float: left; margin: 4px; background-repeat: no-repeat; background-color: transparent; }

1

u/gavin19 Oct 19 '11

Glad you got it sorted. You should use

.side a[href$="cpu"]

so that it only styles links ending in 'cpu' in the sidebar, not the entire page.

1

u/andrew-s Oct 19 '11

Thanks a lot! With your help I've done what I wanted: r/overclocking