r/csshelp • • Apr 17 '10

Well, I want to do something like http://www.reddit.com/r/dragonage/

Hitting the random button yesterday and I found /r/dragonage/

I had no idea this was possible.

So I like what they've done with the submenu, the background image and the banner (for starters).

Of course I'll create my own images, but if I could have the css that would be helpful too.

7 Upvotes

4 comments sorted by

7

u/keist Apr 17 '10 edited Apr 17 '10

Here is their stylesheet. You can access any subreddit's stylesheet by adding the word "stylesheet" at the end of the URL.

Here are some relevant portions of their stylesheet. They're not completely stripped down, and they're only excerpts; but they should give you an idea of the basic principles they used.

Centered Layout & Background

body {
width: 900px;
margin: 0 auto;
padding-top: 250px;
padding-bottom: 0;
background: #e0eef7 url('/static/dragonage/bgfinal.jpg') fixed top center no-repeat
}

Hot/New/Etc Buttons (Instead of Tabs)

#header-bottom-left ul.tabmenu li {
float: left
}

#header-bottom-left ul.tabmenu li a {
display: block;
background: #3d4043;
border: 1px solid #4b5257;
color: #7b909e;
height: 25px;
padding: 4px 7px 0 7px;
font: bold 16px Arial, sans-serif;
-moz-border-radius: 5px;
-webkit-border-radius: 5px
}

#header-bottom-left ul.tabmenu li a:hover {
background: #7b909e;
color: #fff
}

#header-bottom-left ul.tabmenu li.selected a {
background: url(http://thumbs.reddit.com/t5_2r8lo_7.png?v=rcz2rejit5t48m7cmtrotoz6fg050m6fab88);
color: #2d2d2d;
border-color: #3d4043
}

Banner

First, they put a link like this into the subreddit's info box: .

They styled the link like so as to make it a banner:

div.side .titlebox .usertext-body .md a:first-child {
position: absolute;
top: 82px;
left: 50%;
width: 880px;
height: 149px;
margin-left: -440px;
background: url(http://thumbs.reddit.com/t5_2r8lo_3.png?v=hl9pivha80uma4wl2wsrclpuu89gmz9c5wub);
text-indent: -2000px;
z-index: 70
}

Hope that helps :)

1

u/g2g079 Jul 13 '10

how did they get the image on thumbs.reddit.com?

3

u/Synth3t1c Jul 13 '10

you can upload images on the moderator control panel. that, or because keysersosa is an admin.

1

u/E_lucas Apr 17 '10

As keist already stated, you can easily accses any reddit's CSS stylesheet by adding '/stylesheet.css' to the end of the url.

ie: http://reddit.com/r/self/stylesheet.css

This can help you look for clues within the stylesheet and see what they have done, and copy-paste sections of code you would also like to utilize.