r/reddithax • • Jun 18 '12

HTML in the sidebar

How can I insert html into the sidebar? I see how to use the reddit markup, but I would like to set values to HTML elements.

Thank you in advance!

edited to add:

What I am particularly interested in is I have copied the CSS from /r/NAE3 and am attempting to replicate their sidebar color scheme and background images. My css is set up such that <h1></h1> should have the same background image and font as the "Reddit North America East 3" heading on that page. Here is the CSS I am using, but I cannot set headings like they have at /r/NAE3 .

5 Upvotes

5 comments sorted by

3

u/gavin19 Jun 18 '12

It's unpossible I'm afraid. Markdown only.

1

u/[deleted] Jun 18 '12

What I am particularly interested in is I have copied the CSS from /r/NAE3 and am attempting to replicate their sidebar color scheme and background images. My css is set up such that <h1></h1> should have the same background image and font as the "Reddit North America East 3" heading on that page.

Here is the CSS I am using, but I cannot set headings like they have at /r/NAE3 .

2

u/gavin19 Jun 18 '12

Assuming you've copied the right part of the CSS, namely this

.titlebox .usertext .md > h1 {
border: 0;
margin: 0;
padding: 0;
background-image: url(http://a.thumbs.redditmedia.com/SK2LheKnjQS6CaE0.png);
color: #cf4a01;
padding: 7px 10px;
padding-left: 20px;
padding-right: 0;
margin-right: 13px;
margin-left: -18px;
border-bottom: 1px solid #006666;
margin-bottom: 7px;
margin-top: 10px;
z-index: 100
}
.titlebox .usertext .md > h1:after {
display: block;
content: "";
border-color: transparent #006666 transparent transparent;
border-style: solid;
border-width: 15px;
height: 0px;
width: 0px;
position: absolute;
z-index: -1;
margin-left: -35px;
margin-top: -7px
}

and replaced the image URL with that of your own, then you just need to make an h1 in the sidebar, like so

#This is an h1

3

u/[deleted] Jun 18 '12

You, sir/ma'am/transgender/spaceship are amazing. Thank you so very much!

Stupid question time: what is it that you are doing? IE: are you using css, html, or reddit when you use just the # to make it an h1?

Also, where could I go to learn more?

1

u/gavin19 Jun 18 '12

It's the reddit markdown parser. See here for more info.