-
Notifications
You must be signed in to change notification settings - Fork 23
Home
Before I start, I'll go into the css basics. The reason for this is simple, 99% of the people using a theme want to adjust it to their own needs. I am providing the theme and am more than willing to help out. But I am only willing to do so if you grasp the basics of CSS. Because it really isn't doable for me to explain the basics every single time and I don't have the time either to write the adjustments for every individual out there. With that out of the way, lets get started.
In its core css is build up of two parts
- Selectors
- Properties inside those selector
Whenever you see css the selector is the part before the curly bracket and its most simple form you can directly address html elements. To give you an example, to change something that affects all urls it would look like this
a {
property: propertyvalue;
}
This of course isn't that very useful if you want to change more specific elements. To target specific elements there are a whole host of options available but at its most basic you are looking at two kinds:
- IDs
- Classes
IDs are supposed to be unique to one element and in css always start with #, in html you can also spot them rather easily
<a id="thisThing">I am an url!</a>
So in css you can do something like this
#thisThing {
property: propertyvalue;
}
And target that specific element with that ID. Sometimes someone messes up and you end up with two elements with the same ID, but if one is an url and the other is something else (a div for example) you can be more specific with
a#thisThing {
property: propertyvalue;
}
Classes are not unique to single elements but can be seen as a category of elements. They too are easy to spot in html
<a class="theseThings">I am an url!</a>
And you target them with a dot like this
.theseThings {
property: propertyvalue;
}
or once again if you need the specific kind of element
a.theseThings {
property: propertyvalue;
}
You can read more about it here if you want: http://www.w3schools.com/css/css_syntax.asp
And this video nicely shows how you can use the chrome inspector tools (similar available in firefox) to try out and tweak css: https://www.youtube.com/watch?v=sdLxvD23uhY
- go to the following address: https://github.com/creesch/Boxed-css-theme-for-reddit/blob/master/sprites-05.png
- right click on the "raw" button and select "Download as" and save the image to a directory you will easily find again. Do NOT rename it.
- go to the following address: https://github.com/creesch/Boxed-css-theme-for-reddit/blob/master/boxed_base.css
- left click "raw" .
- select the entire page/text and copy it.
- Go the your subreddit but add the following to address /about/stylesheet . So for http://www.reddit.com/r/boxed it would become http://www.reddit.com/r/boxed/about/stylesheet
- Paste the text you just copied into the large text field.
- Don't click save yet!
- Under "images" select the browse button. This will open up a file selection dialog.
- Go to the directory where you saved sprites-05.png earlier, select the file and click "open".
- Make sure that in the "new image name" field it says "sprites-05"
- Click upload and wait until it says "saved" .
- Click the "save" button under the big text field.
- Theme installed!
In order to also get the announcement bar you have to do the following:
-
Go to subreddit settings (about/edit/ so for boxed http://www.reddit.com/r/boxed/about/edit/)
-
Go the the text field with the "Sidebar" header.
-
Enter something that looks like this:
### My announcement text here
-
Click "Save options"
-
Done! Your subreddit is now styled with /r/boxed!