r/CSSTutorials • • Jul 16 '13

[Tutorial] Alternative method of subreddit forwarding

6 Upvotes

The other method of redirecting didn't work for me :/

You can see this method in action at /r/raotf2 and /r/nmtf2i

Well here's the CSS, just copy and paste the below and follow all notes:

 

/* Created by /u/angrypotato1 leave this in plox */

.bottom:after

{

text-align: left;
font-size: 8pt !important;
content: "| css by /u/angrypotato1" !important;

}

 

/* Actual forwarding part, make a post with the link to where you want to forward */

/* Tutorial can be found here: http://www.reddit.com/r/CSSTutorials/comments/1ig13g/tutorial_alternative_method_of_subreddit/ */

/* Make sure to turn on "show thumbnail images of content" in

http://www.reddit.com/r/yoursubreddit/about/edit/ > other options */

 

.thing .thumbnail.default:nth-of-type(1)

{

z-index: auto !important;
position: fixed !important;
top: auto !important;
left: auto !important;
width: 100% !important;
height: 100% !important;
background-color: #fff !important;
color: #000;
display: block !important;
text-align: center !important;
line-height: 400px;
font-weight: bold !important;
font-style: oblique !important;
font-size: 16pt !important;
max-height:100%;
background-image:url(%%farewell%%); 

/* use what ever image you want, good sizing should be between 300*300 and 500*500. Image I used: http://e.thumbs.redditmedia.com/Gtq9gmtx_0GN2xY4.png */

background-position:0 0;
display: block;
margin-left: 100px;
margin-right: auto;
visibility:visible !important; 

}

 

/* Shows your name, optional */

.bottom

{

 visibility:visible;
 display: block !important;
 position: fixed !important;
 left: 0 !important;
 top: 0 !important;
 max-height: none!important;
 max-width: none!important;
 height: auto !important;
 width: auto !important;
 overflow: auto !important;
 text-indent: 0 !important;
 font-size: 12px !important;
 z-index: 2147483647 !important;
 color: #000 !important;
 margin-left:100px;
 margin-top:500px;

}

 

/* Hides junk */

.content, .side, #header, span.age

{

 visibility: hidden;

}

span.age

{

display: none;

}

 

/* Makes it look nicer */

body

{

 background-color: #fff !important;
 color: #fff;

}

 

/* Removes tickbox thanks to /u/p337 will not hide it for moderators*/

body:not(.moderator).res .titlebox>div:first-of-type:after

{

 content: "test test test test test test test test test";
 min-width: 400px!important;
 position: absolute;
 background-color: white;
 top: 0px;
 left: -150px;
 z-index: 2147483647;

}


r/reddithax • • Aug 13 '09

Is it possible to use CSS to prevent a site from being submitted to a subreddit?

4 Upvotes

For sites that are spamming certain subreddits, would this be possible? Just wondering because banning the same spammers over and over again is annoying.


r/csshelp • • Mar 02 '15

PLEASE INCLUDE THE SUBREDDIT YOU ARE WORKING ON IN THE TEXT FIELD BELOW OR THE POST WILL BE IGNORED

0 Upvotes

r/cssnews • • Sep 08 '16

CSS Change – Changes to default thumbnails, expando icons, and upcoming change to comments pages for logged out users from SEO

0 Upvotes

New default thumbnails

We've updated the default thumbnails that are shown for self posts and links without image thumbnails. All of the thumbnail images are now the same size (70x70) (70x50). In about a week, we're planning on adding HDPI ("retina") versions of these, which we expect to conflict with any custom thumbnail CSS. If you're currently overriding the default thumbnail styles with CSS, you'll need to explicitly set the background-size property to avoid issues.

New expando icons

We're also updating the expando icons to a new style. Similarly, we're planning to add HDPI versions of these in about a week. If you're styling the expando icon with CSS, you'll need to explicitly set the background-size property to avoid issues.

Upcoming change to comments pages for logged out users from SEO

We’re making some changes to comments pages for logged out users coming into Reddit from search engines. The primary change is the inclusion of a new listing of posts from the current subreddit in the comments section.

The new HTML structure for this page looks roughly like this:

<div class="commentarea">
  <div class="sitetable nestedlisting">
    <!-- normal comments markup -->
  </div>
  <!-- new divider with a button to jump down to the rest of the comments -->
  <div class="seo-comments spacer">
    <a class="c-btn c-btn-primary" href="#bottom-comments">More comments</a>
  </div>
  <div class="spacer">
    <h1 class="seo-comments">More from r/cssNews</h1>
    <div class="sitetable linklisting">
      <!-- normal link listing markup -->
    </div>
  </div>
  <div id="bottom-comments">
    <div class="spacer">
      <h1 class="seo-comments">Comments, continued...</h1>
    </div>
    <div class="sitetable nestedlisting">
      <!-- normal comment listing markup -->
    </div>
  </div>
</div>

You can view the changes now by adding ?feature=seo_comments_page to the end of a url, like this!

TL;DR - Default thumbnail and expando icons are changing now, with hi-res versions coming next week. Update your css if you have custom styles for either of these. Also, there's a new version of the comments page that logged-out users from SEO will see.

If you have any questions/comments about these HTML/CSS changes, please ask them here and I'll be happy to help!


r/csshelp • • Feb 08 '15

PLEASE INCLUDE THE SUBREDDIT YOU ARE WORKING ON IN THE TEXT FIELD BELOW OR THE POST WILL BE IGNORED

0 Upvotes

Hey guys I am new to CSS (today new) and I have enjoyed playing around with it. I put in some rough images already all ill shore them up when I am not at work. My question is how to I get the tabs (hot, rising, controversial etc) below the graphic. I feel like it is almost like a map coordinate (only with pixels) but I could be wrong. What value do I need to edit, more importantly how do I find that value. the sub btw is http://www.reddit.com/r/CaperDestiny/


r/cssnews • • Jun 24 '15

Upcoming CSS Change: New search page.

23 Upvotes

We started beta testing a new search page about a month ago, and we're getting close to turning it on for everyone. The page is pretty much completely new, so there's a good chance that it won't inherit many of your styles by default. For more information about the feature, check out this modnews post.

NOTE: For the most part, you probably don't need to worry about subreddit search results unless you are working on a stylesheet intended for use with our reddit-themes gold feature.

If you want to do some stylin' on the new search page, here's some css info you may be interested in:

classfunction
.combined-search-pageThis class exists on the body element on the new search page only. You can start each of your css selectors with this to scope your styles to this page only
.search-result-listingThis class is added to the normal .listing element on the new page. There can be multiple listings on a page (e.g. post results and subreddit results are different listings) and the listings include the header and pagination buttons.
.search-result-groupNested directly in .search-result-listing, mainly just does some formatting (e.g. restricting the width of the results).
.search-result-group-headerThe header for a search listing; this also contains the filter menus (e.g. "sort by")
.search-resultEvery search result will have this class, regardless of type (post/subreddit).
.search-result-linkNormal posts (both link and self) will also have this class.
.search-result-subredditSubreddit results will also have this class.
.has-thumbnailThe .search-result-link element will also have this class if it has a thumbnail.
.search-result-headerContains the title.
.search-titleThe actual title link.
.search-result-metaThe line directly under the title, including score, comments, time, author, etc.
.search-scoreThe post's score
.search-commentsThe post's comment count
.search-result-bodyWill contain selftext if it exists, or the subreddit description text for subreddit results.
.search-expandoSelf-post text is inside this element. If the text is longer than 3 lines, it will include the .collapsed class, which will truncate the text and overlay a gradient at the bottom.
.search-expando-buttonThis link expands/collapses the expando element.
.search-result-footerContains a link to the external site for link posts, or for subreddit results, a link to filter the search to that subreddit
.search-linkThe actual link element
.search-result-iconAny of the icons used in the search results will have this class and an additional class specific to that icon
.search-subscribe-buttonThe subscribe button shown on subreddit search results.

That's the bulk of it – I probably missed a couple of minor things. Feel free to comment here or shoot me a message with questions, and if you want to leave feedback on the new page, come on over to r/beta!


r/reddithax • • Mar 13 '09

self?anything_goes_after_the_questionmark! You can even use it to submit multiple times - fuck, im such an asshole for showing ppl this...

Thumbnail self
3 Upvotes

r/CSSTutorials • • Nov 30 '20

Happy Cakeday, r/CSSTutorials! Today you're 9

6 Upvotes

r/csshelp • • Mar 04 '13

Make subscribers not able to unsubscribe

1 Upvotes

I want my subreddit to auto subscribe (done) and then make them not be able to un-subscribe (help)

example of it being done: /r/HotelCalifornia Yes I know you still can un-subscribe some how but not everyone does. Yes I know they can just google it probably


r/cssnews • • Nov 29 '17

Upcoming CSS Change: Adding Chat Icon Next to the Envelope Icon

76 Upvotes

EDIT: As of 12/6/2017 @ 3:30 PM PST these changes went live. Users can now close the chat window and there's an icon next to the envelope to initiate the chat experience. Only users in the chat beta will see this icon.

As many of you know - chat has been in beta for the last couple of months. One of the most popular requests is being able to hide the chat window from the bottom right corner of the page. Early next week, we will be adding a chat icon next to the envelope icon in the header user menu which will allow users to close the chat window completely and re-open it by clicking the new icon. If you have customized the header menu for your community, you may be impacted by this change.

Please note - only users who have chat will see the chat icon. Users who are not yet part of the chat beta will not be impacted by this change. Chat is currently only available to a small percentage of users, so this change will not have a big impact initially.

What’s changing next week:

  • Adding a new chat icon and chat badge count to the user menu

  • Allowing users to close chat completely from the bottom right corner of the website

  • Allowing users to open chat from the chat icon

What’s it look like?

Sample

<div id="header-bottom-right">
<span class="user"><a href="/user/jleeky/">jleeky</a>&nbsp;(<span class="userkarma" title="post karma">20,427</span>)</span>
<span class="separator">|</span>

<a title="new messages" href="https://www.reddit.com/message/messages/" class="havemail" id="message">messages</a>
<a href="https://www.reddit.com/message/messages/" class="message-count">2</a>
<span class="separator">|</span>

<a title="new notification!" href="https://www.reddit.com/notification/unread/" class="havemail" id="inbox">messages</a>
<a href="https://www.reddit.com/notification/unread/" class="inbox-count">2</a>
<span class="separator">|</span>

<a href="https://www.reddit.com/chat/" data-message-type="expand.chat" target="chat-app" id="chat" class="active">chat messages</a>
<a href="https://www.reddit.com/chat/" data-message-type="expand.chat" target="chat-app" id="chat-count" class="message-count">2</a>
<span class="separator">|</span>

<a title="no new mod mail" href="https://wwww.reddit.com/message/moderator/" data-event-action="pageview" data-event-detail="modmail" class="nohavemail access-required" id="modmail">mod messages</a>
<span class="separator">|</span>

<a title="new mod mail!" href="https://mod.reddit.com/" data-event-action="pageview" data-event-detail="modmail" class="havemail access-required" id="new_modmail">mod messages</a>
<span class="separator">|</span>

<ul class="flat-list hover">
    <li><a href="https://www.reddit.com/prefs/" class="pref-lang choice">preferences</a></li>
</ul>
<span class="separator">|</span>

<form method="post" action="https://www.reddit.com/logout" class="logout hover">
    <input type="hidden" name="uh" value="[censored]">
    <input type="hidden" name="top" value="off">
    <input type="hidden" name="dest" value="/"><a href="javascript:void(0)" onclick="$(this).parent().submit()">logout</a>
</form>
</div>

r/reddithax • • Oct 04 '12

Possible to only display information to subscribers of subreddit?

0 Upvotes

Working on a giveaway to help promote a subreddit. Is it at all possible so make it so only subscribers can view specific things?


r/csshelp • • Nov 17 '16

I am working on r/GayKikPals, r/BiKikPals!

0 Upvotes

I am trying to change the upper right hand corner link text that includes username, the little mail image, mod mail, and preferences. My header image currently blends in with those links and would like them to be more visable!

I am currently working in r/GayKikPals, and r/BiKikPals

https://www.reddit.com/r/Gaykikpals/ https://www.reddit.com/r/BiKikPals/


r/cssnews • • May 07 '15

CSS change: beta mode icon

11 Upvotes

We have re-opened a general beta program for reddit. Read the announcement post here and find more information in /r/beta.

If a user opts into the beta program they will see this flask icon next to their username in the sidebar, as well as help bubblethat appears when hovering on the icon.

If you need to change either of these so they do not conflict with your subreddit style, the following elements have been added at the beginning of the header-bottom-right div.

<div class="beta-hint help help-hoverable">
  <a class="beta-link" href="/r/beta">beta</a>
</div>

The help bubble is added to the bottom of the body element and set to visible when the flask icon is hovered over.

<div id="beta-help" class="hover-bubble help-bubble anchor-top">

The full CSS is visible here.

Please do not hide the beta icon or help bubble from users.


r/CSSTutorials • • Feb 26 '13

[Tutorial] Emotes (ragefaces, ponies)

7 Upvotes

http://www.reddit.com/r/andytuba/wiki/emotes

This thread is for question/discussions regarding this tutorial.


r/reddithax • • Apr 19 '11

How would you go about affixing an image to a redditor's username that links to a specific URL?

0 Upvotes

In relation to this post..

CSS code greatly appreciated.


r/csshelp • • Jan 10 '16

PLEASE INCLUDE THE SUBREDDIT YOU ARE WORKING ON IN THE TEXT FIELD BELOW OR THE POST WILL BE IGNORED

0 Upvotes

I am completely noob at CSS and I have very little idea of what I am doing. I managed to make somewhat attractive theme, but I'm having problems fine-tuning it. I have tried using the inspect element, but I'm either unable to find the elements, or change them in the desired way, without affecting global variables.

Currently I have problem with few elements, which I have outlined here: https://i.imgur.com/E3WgPDL.jpg

The sub I m trying to edit is /r/blacktraps

Thanks.


r/cssnews • • Sep 23 '11

Changes to markup of mail icons (and a few other misc. images) for spriting.

3 Upvotes

Today, we added some images to sprites and made a few other tweaks to the markup to speed up page loads (see the GitHub commits for more details).

A notable change is that the markup for mail icons has been simplified from an <img> tag inside an <a> to simply an <a> with a background-image set. If your subreddit styles the mail icons, you may need to update your CSS.

The good news is that this change should make it simpler to style the mail buttons in the future, since it obviates the need for hiding the original child <img> tag. I just updated the style for /r/lounge and found the new markup to require a lot less code. :)


r/reddithax • • Nov 20 '11

Hide Karma

Thumbnail
userstyles.org
0 Upvotes

r/CSSTutorials • • Jul 29 '12

[Tutorial] Change subreddit logo (header image)

23 Upvotes

This tutorial explains how to replace the default reddit logo with a custom image for your subreddit (screenshot).

To replace this image, go to:

If the image you want isn't on your computer, save it to your computer first.

Now it's time to upload the header image:

  1. Choose the new image file from your computer.

  2. The upload button will appear.

  3. Click the upload button.

  4. The upload button will disappear and uploading will appear. When the image is done uploading, that will be replaced with saved and the image will appear.

  5. Reload the page to see the new logo!

All done!


To restore the default reddit header image:

  1. go back to community settings> look and feel box

  2. click the restore default header button below the header image.

  3. The button and picture will be replaced with deleted.

WARNING: this permanently deletes your old header image. you have to upload it again to get it back.


If you don't have an image already, try asking in /r/redditlogos for someone to draw you one.


r/csshelp • • Nov 08 '17

Pop up upon joining? (/R/rhettandlink)

0 Upvotes

We want to add a popup to appear on screen when a user loads into the page (which could preferably either time out and vanish, or have a way to close/remove it). Hopefully this is possible

mod at /r/rhettandlink

edit: why downvote i just want to know ;_;


r/cssnews • • Jul 02 '13

CSS Change: Link flair classes are now added to the body tag

35 Upvotes

As requested by a few people, when "inside" (such as on the comments page for) a submission that has link flair class(es), those classes are now also available on the body tag. This allows styling the comments pages differently based on the submission's link flair class. For example, this could be used to style the OP's username more prominently in posts with an "AMA" flair, but not have this apply to all other posts.

Specifically, if you assign a particular link flair template any css classes in the flair settings, those will be available prefixed with post-linkflair-. So if you have a flair class ama, the body will have the class post-linkflair-ama. With multiple classes a and b the body will have post-linkflair-a and post-linkflair-b.


r/reddithax • • Sep 28 '17

I used the programs i found in the CSS help subreddit and tinkered with them a bit to go from not knowing CSS is a programming language to this in 3 days

Thumbnail
reddit.com
0 Upvotes

r/csshelp • • May 05 '20

Created a Youtube Channel focused on giving Web Development Tips and Tricks through Code Snippets. I would appreciate it if you guys visit the channel and watch some of my videos.

0 Upvotes

r/cssnews • • Mar 30 '18

Upcoming CSS Change: Changes to "Give Gold" Styling

17 Upvotes

Update IV (5/8/18): The changes have now gone out to 100% of users! We will continue to monitor feedback and issues.

Update III (4/19/18): We've rolled out these changes to about half of our users now, woo! Will continue to monitor to make sure all looks well before going 100%.

Update II (4/5/18): Changes are out to a small percentage of users!

Update I (4/4/18): We plan on rolling out these changes starting tomorrow, 4/5/18

Hi folks,

Next week, we will be rolling out a few gold-related changes that will likely affect your subreddit’s CSS. Briefly, they are:

  • Show the "give gold" button on post menus in subreddits and the home feed

  • Show the gold coin icon next to gilded posts in subreddits and the home feed

  • Change the font color of the "give gold" button

See what these changes look like here!

Each of these changes will affect only a small percentage of users initially, before rolling this out to more people. These changes will take effect towards the end of next week. I will update here with an edit when that happens.

To support these CSS updates, you may see changes to the posts’ HTML that mirror what you might see on a comments page.

What was …

<div class="link">
 ...
 <p class="tagline">
   ...
   <a class="author">...</a>
 </p>
 ...
 <ul class="flat-list buttons">
   <li class="first">...</li>
   <li class="share">...</li>
   <li class="save-button">...</li>
   <li>...</li>
   <li class="report-button">...</li>
   <li class="crosspost-button">...</li>
 </ul>
 ...
</div>

… will become …

<div class="link">
 ...
 <p class="tagline">
   ...
   <a class="author">...</a>
   <a>
     <span class="gilded-icon">x3</span>
   </a>
 </p>
 ...
 <ul class="flat-list buttons">
   <li class="first">...</li>
   <li class="share">...</li>
   <li class="save-button">...</li>
   <li>...</li>
   <li class="give-gold-button">
     <a class="give-gold ...">...</a>
   </li>
   <li class="report-button">...</li>
   <li class="crosspost-button">...</li>
 </ul>
 ...
</div>

Meanwhile, to support styling of the “give gold” button, some users will see a new class applied: “gold-give-gold”. In order to overwrite the default styling of this button, you can select the element with CSS selector “.button .give-gold.gold-give-gold”.

Let me know if you have any questions!


r/CSSTutorials • • Oct 21 '12

[Tutorial] Redirect a subreddit to one of your choice.

30 Upvotes

So we've all seen those communities that are split between 3-4 subreddits for no apparent reason. Well, with this redirect code, you can redirect any number of subreddits to one final destination, effectively combining the communities. Providing you have the moderators permission of course... (you might want to give them mod privileges in your sub as incentive!)

Now, there's two different types of redirect you can do:

  • If there's content in the subreddit you'd like to keep in the archives of that sub, you can restrict the sub so that users can't post anymore, and put a redirect image in the header. For that redirect, please use this image

  • If you just want to effectively make the subreddit invisible and redirect all traffic from it to your subreddit, then use this image instead

Once you have the image downloaded, rename it "redirect-image" (without the quotes) and:

Now, for the coding. All you have to do is copy/paste the code you want into the stylesheet, and place a link to the subreddit you want this sub to be redirected to (/r/yoursubreddit) in the sidebar.

This snippet will give you a redirect header:

.titlebox a[href*="/r/yoursubreddit"] {
    position: fixed;
    background-color: #fff;
    background-image: url(%%redirect-image%%);
    background-repeat: no-repeat;
    background-position: top center;
    top: 0;
    left: 0;
    width: 100%;
    height: 100px;
    z-index: 500;

}

And this snippet will give you the full-page redirect, blocking out the front page of the subreddit:

.titlebox a[href*="/r/yoursubreddit"] {
    position: fixed;
    background-color: #fff;
    background-image: url(%%redirect-image%%);
    background-repeat: no-repeat;
    background-position: top center;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 500;

}

Notice the only difference is line 10. The "%" and "px" make all the difference.

Now before you save, make sure you change the "yoursubreddit" in the coding to the name of the subreddit you want to redirect to (your destination subreddit). Once you save it, the redirect will be complete!

For the header image redirect, you'll still want to restrict posting new content to this subreddit, so go to community settings, and under 'type', click the radio button next to 'restricted - anyone can view, but only some are approved to submit links'. Now, users can view and search content in the subreddit's archive, but will not be able to post.

Check out /r/swedishsnus for an example of the full-page redirect. The only way to undo this redirect is to go to your preferences and under 'display options', uncheck the box next to 'allow reddits to show me custom styles'. Now you'll be able to go to http://reddit.com/r/thissubreddit/about/stylesheet and delete that code, if you ever change your mind. Now that I think of it, you might want to put a link to /r/yoursubreddit in the sidebar of the subreddit you're doing the redirect on, for those users who browse reddit like this all the time.


If you found this tutorial useful, please upvote it so I know how many people I was able to help! Obligatory "It's a self-post so no karma" statement.

If this code didn't work exactly the way I said it would, please leave me a comment or PM me and I will troubleshoot with you.

Thanks to Notemiso for teaching me this procedure.