r/csshelp • • Jun 13 '11

How do I give my subreddit a "Trophy Case" in the sidebar similar to r/trees and r/circlejerk?

8 Upvotes

I've looked at the css for r/circlejerk and there is a section of the code labeled "Trophy Case" that I believe I can modify to suit my purposes, however I'm a complete css amateur. It looks to me like some sort of code in the sidebar as well is required to make this work, since I can't find the text "Over the line!" or "Reddit Platinum" at all in the css.

Could someone help me out and explain to me what would need to be in the sidebar for this to work? I want to put a trophy case in several of my subreddits but I need to understand this before I can do so. Thanks!


r/csshelp • • Oct 13 '10

Default Subreddit to "What's New" instead of "What's Hot"?

8 Upvotes

Is there any way to make a subreddit pull the New tab instead of the Hot tab?

I manage a small community with a very small number of posts. This would help us immensely as we have quite a few "hot" but old posts that stay near the top while the newer stuff can get missed.


r/csshelp • • Dec 31 '21

Request Difference between class and Id? (Newbie)

7 Upvotes

Hey all. I’m trying to wrap my head around an entry level concept - difference between ids and classes. I don’t understand why I would use an Id over a class? Can’t everything be a class? I found this example off stack overflow:

<div Id= “MyRedText”>This will be red.</div> <div class=“blueText”>this will be blue.</div>

MyRedText would be used for the Id and .blueText would be used for the class in the CSS

Why wouldn’t I just make both a class and use “.MyRedText” and “.blueText” in the css? Thank you for the help!


r/csshelp • • Dec 14 '21

Request class and ID differences ?

7 Upvotes

starting to leanrn more frontend because ive spent a lot of time on the backend. I came across this right here:

     <h5 class = 'author-class' id = 'author-id'>By: Stacy Gray</h5>

now to my understanding, because id is more specific, Stacy Gray will be in the color of cornflower blue right ?

    h5 {
      color:yellow;
    }
    
    .author-class {
      color: pink;
    }
    
    #author-id { 
      color: cornflowerblue; 
    }

however, my problem is that, if the ID is already going to denote what the color is going to be, why can i just take out class = 'author-id' and just leave it as id = ""; ?


r/csshelp • • Dec 11 '21

Request 95% of my homepage loads with all CSS applied, but I have a few random divs that load with the whole page as normal, but then apply padding late enough to be visibly noticeable where you can see it shifting in real time. Any tips for preventing this? This is Wordpress, if it matters.

7 Upvotes

I have many many instance of padding all over the page, but for some reason it's loading a few of them way later than everything else.

I've considered this jQuery script to hide the page until it's fully loaded, but that's a last resort. I was hoping I could somehow address the root cause instead of just hiding it.

Any tips?


r/csshelp • • Jul 20 '21

Request /r/Olympics mod here: we could really use a clock displaying the current date and time in Tokyo. Does anybody know how to do that? (We could also use someone to post an Olympic picture of the day in the sidebar, if anybody's interested in something more longterm.)

7 Upvotes

r/csshelp • • Jul 09 '21

Resolved Tooltip but cut off by another div?

7 Upvotes

I am making a button that has a small box that appears above it when hovering over the button. But that hover element gets cut off when the hover element appears over another div. Set the button position to fixed... well fix it but make the button itself fixed, so all button that is made afterward appear in the same spot. I am making a Tooltip base from Web Dev Simplified Youtuber.

https://www.youtube.com/watch?v=ujlpzTyJp-M&t=3s

Here the code I was using.

/*#region Tooltip*/.Tooltips {margin: 0;overflow: visible;background-position: center;position: relative;}.Tooltips::before,.Tooltips::after {--scale: 0;--arrow-size: 20px;--tooltip-color: #333;position: absolute;top: -.25rem;left: 50%;transform: translate(-50%) translateY(var(--translate-y, 0)) scale(var(--scale));transition: 150ms transform;transform-origin: bottom center;}.Tooltips::before {--translate-y: calc(-100% - var(--arrow-size));content: attr(data-tooltip);color: white;padding: .5rem;border-radius: .3rem;text-align: center;width: max-content;

/*Caution as this seem to make black box as wide as it can to cover text, so not good for paragraph.*/max-width: 100%;/*Caution as this allow for paragraph but limit it to original width of source, in this case, the avatar or image.*/background: var(--tooltip-color);}.Tooltips:hover::before,.Tooltips:hover::after {--scale: 1;}.Tooltips::after {--translate-y: calc(-1 * var(--arrow-size));content: '';border: var(--arrow-size) solid transparent;border-top-color: var(--tooltip-color);transform-origin: top center;}/*#endregion*/

EDITED: Okay. I got it to work. It was not cut off by div above it but rather trapped by its own div. and the overflow is set to auto, which seems to hide the hover element, and once set to visible, hover element appear just fine. I just got to make sure that I do not add too many buttons that scrollbar appear for this div.


r/csshelp • • Jun 13 '21

Weird css hover with movement

7 Upvotes

Is there any way to increase the "mouse area" of a element? I've made a div that goes up a bit after it has been hovered, but it gives results like this: https://imgur.com/gallery/Hl7I5bG when you put your cursor underneath. So is there any way to increase mouse area? Thanks in advance :)


r/csshelp • • May 13 '21

Resolved Help! Why are my grid-items so short?

7 Upvotes

Hello, I'm new to css...

Here's my problem: all the JS that I add to my grid-item-3 disappears (because the grid-item is too short... I think). I have no idea why it's defining the grid box as so short? I've attached my code, does anyone have an idea?

(I would like long columns that adapt to how much I put them if possible.)

Any help would be so appreciated!!!

.grid-container {
    display: grid;
    grid-template-columns: .5fr 3fr 3fr .5fr;
    grid-gap: 20px;
    grid-template-areas: "header header header header"
    "sidebar content2 content sidebar2"
    "sidebar content2 content sidebar2"
    "sidebar content2 content sidebar2";
    height: 100vh;
    grid-column-gap: 150px;
    grid-row-gap: 80px;
}

.grid-item-1 {
    grid-area: header;
}


.grid-item-2 {
    background-image: url("brick.png");
    background-size: 300px;
    background-repeat: no-repeat;
    position: relative;
    top: 70px;
    grid-area: content;
}


.grid-item-3 {
    display: flex;
    justify-content: center;
    align-items: center;
    display: grid;
    position: relative;

} 
.grid-item-01 {
    grid-area:sidebar;
}
.grid-item-0 {
    grid-area: sidebar2;
}

r/csshelp • • Apr 15 '21

Nav bar style question.

7 Upvotes

I want to make my nav bar have a slight wave like this website:

https://emporiumpies.com/

How would I go about this?

Thanks for the help!


r/csshelp • • Mar 14 '21

/r/canucks Old reddit flairs not showing up unless they have custom flair text

7 Upvotes

/r/canucks

Nothing in our CSS has changed but the old reddit flairs no longer work. Only if the user has additional flair text, which is not available to users.

Our flair system works as follows, so that it works with the new reddit emoji system as well

Flair textFlair class
:Orca:Orca

r/csshelp • • Feb 04 '21

Resolved How do you move an element for users without RES, without changing anything for RES users?

7 Upvotes

The element is the subscriber count. It's out of place by a few pixels. I need to lower it a little, but only for users without RES while they're logged in. Everything is fine for RES users, and users without RES who are not logged in. I'd still like the subscriber count to be positioned properly for users without RES when they're logged in if possible. Thanks in advance.

r/PoliticsBipartisan


r/csshelp • • Dec 29 '20

A Simple CSS3 Accordion Tutorial

7 Upvotes

Hello everybody, in this article, we will learn how to make a beautiful accordion with HTML and CSS only! Yes! You heard that right, plain HTML, and CSS with no Javascript at all!
https://www.loginradius.com/blog/async/css3-accordion/


r/csshelp • • Nov 01 '20

Resource A comprehensive guide to html forms

7 Upvotes

Link to the video : https://youtu.be/Vl6y3dLUCR4

in this video I cover all the basics of html forms with easy to understand examples. we can use html forms to gather information from the user and send it to a server for processing or another html page.


r/csshelp • • Aug 28 '20

Footer image not showing up

7 Upvotes

/r/venturebros

https://old.reddit.com/r/venturebros/about/stylesheet/

There are images that used to show up on the bottom right of the page. I can't get them to show up anymore for some reason. Thanks for any help!

This is the code:

.footer-parent {
height: 300px;
width: 300px;
padding-top: 10px;
padding-bottom: 10px;
clear: both;
text-align: center;
width: 100%;
background-image: url(%%thebat%%); 
background-position: bottom right;
background-repeat: no-repeat;
margin-bottom: -1px
}

r/csshelp • • Aug 24 '20

Can someone please help me - need to download a web page (open licence) but need to keep the css & javascript in place (opening and closing text blocks) . I've tried localizing the files and downloading the css and .js files but cannot get the features to work. Please DM me and i can send links

7 Upvotes

r/csshelp • • Jul 09 '20

Resolved What is the CSS class for reddit ads?

7 Upvotes

I'm trying to add a border around the ads on my new subreddit. What is the CSS class for reddit ads?


r/csshelp • • May 15 '20

Resolved padding or margin? which method is reccomendable?

7 Upvotes

Hi everyone,

I would like to make a simple footer for a web page that should have this structure

I was thinking using a <div class="footer"> as main container a second <div class="content"> to put all the links inside, like this. I was thinking about using a display: flex; to simply arrange all the text elements but I wasn't sure about how to space them.

do you think would be better to use a padding for the class="footer" or give margins to the div content? I'm quite new to css so these two ways seems both good for me but I don't really know which would be the most appropriate.

Thank you!


r/csshelp • • Mar 01 '20

How do I make one of those "hover over" rules?

7 Upvotes

example

I wanted to do some CSS for my subreddit, /r/12n. I am wanting to know how I do those "hover over" rules like on /r/blursedimages and /r/fffffffuuuuuuuuuuuu.


r/csshelp • • Feb 21 '20

Request Any idea how to proceed coding this interface ?

7 Upvotes

Hello. Having already knowledge about CSS and HTML but never done something similar to a dashboard, I want to know how do I proceed and where do I begin to code this interface. Should I divise the screen to two column or use bootstrap or something else ? Thank you.

https://i.imgur.com/XYalCr5.jpg

Edit : I want it to be responsibe like the mobile interface I added.


r/csshelp • • Dec 31 '19

Resolved Hi, is it possible to change a subreddit title? I have r/Golffit and want to change the F in fit to a capital letter, can anyone tell me how to do this please?

7 Upvotes

r/csshelp • • Dec 25 '19

Resolved Flairs on the flair menu don't show up on mobile but works on PC just fine

7 Upvotes

/r/Cookierun

https://i.imgur.com/Lfc41sH.png (Edit flair on mobile)

https://i.imgur.com/ucm22hu.png (Flair menu on mobile)

https://cdn.discordapp.com/attachments/655801257864462368/659194794873978896/unknown.png (Works fine on PC)

Flair css:

.flair {
    background: url(%%flairsheet2%%) no-repeat -9999px;
    border: 0;
    padding: 0;
}

Link flairs work fine, but strangely, whenever I go to grant flairs on mobile, the flairs do show up.

https://imgur.com/sTFENnO (Granting flairs on mobile)

Edit: Referring to old reddit on mobile browsers

Edit: this works apparently, feel free to tweak numbers

    .flair {
padding: 0px;
margin: 0;
border:0;
line-height: 45px;
vertical-align: middle;
text-align: right;
color: #666;
background: url(%%spritesheetNEW2%%) no-repeat;
min-width: 42px;
min-height: 42px;
padding-right: 10px;
width: auto;
height: auto;
position: relative;
z-index: 10;
opacity: 1;
overflow: visible;
border: 0px;
margin-right: 3px;
text-indent: 45px;
display:inline-block;
    }

r/csshelp • • Aug 27 '19

[Paid] Complete subreddit makeover (re-submitted)

7 Upvotes

Hello CSSHelp

Our last css help vanished without a trace.

We're a newly started subreddit r/ZandalarTribe (World of Warcraft related) who are looking for a professionel to help us build the subreddit.

We have a very rough outline in place of what we'd like.

Currently we're also trying to find an artist to design border-images, a snoo and perhaps more.

Please write me the amount you think this work is worth.


r/csshelp • • Apr 23 '19

Can I change subreddits title to a picture?

7 Upvotes

Is it possible to change the title at the top from text to a picture? If I'm not making myself clear in what I mean by title I'll attach a screenshot. https://i.imgur.com/T0nT5FI.png


r/csshelp • • Aug 19 '18

Resolved Why ban someone when you can shrink all their posts?

7 Upvotes

div[data-author="trashUser"] .entry .usertext .usertext-body {font-size: 1px;}