r/csshelp • • Dec 23 '20

How to add clickable images below the sidebar?

8 Upvotes

Hello, I am a moderator of a small community - /r/Librandu.

On Reddit redesign, you can add widgets with clickable images that appear below the sidebar in separate boxes. As it can be seen here.

How to do the same thing in Old Reddit? How to add the clickable images in between these two boxes?

Here is the subreddit's stylesheet. I apologize if I do not make much sense or if this is a stupid question. I do not have any experience with CSS whatsoever.

I would greatly appreciate if anyone could help me out. Thank you.


r/csshelp • • Nov 16 '20

CSS Cheat Sheet

8 Upvotes

r/csshelp • • Oct 09 '20

How do you create moving CSS or SVG animations as you scroll?

8 Upvotes

Example: https://stripe.com/payments/checkout

If I want all the elements to transition as you scroll is it possible with PNG files or how does one accomplish this?


r/csshelp • • Aug 27 '20

Can you help me achieve this basic layout? (Adobe XD link shared)

8 Upvotes

Hello Guys!

I am new to web development and I have designed a layout in Adobe XD but not sure how to achieve it with HTML and CSS, I would really appreciate your help

Link to the prototype:

https://xd.adobe.com/view/55905d24-ef4f-4e96-830f-cf975a2d27c3-00c3/


r/csshelp • • Aug 19 '20

Is it possible for a text to have a font-size of 100% its container so that when the container grows or shrinks, the font-size grows and shrinks accordingly?

8 Upvotes

Hi

For example here: https://codepen.io/AshkanAhmadi/pen/QWNKqyg

I want This is a text to always be as wide/big as its container (the beige container) so if the window or the column changes size, the font also changes. Can it be done with CSS or does it need JS?

Thanks


r/csshelp • • Jun 04 '20

Request Any useful website like csslayout.io, but for advanced css animation, and interactive features?

8 Upvotes

https://csslayout.io/

Sticky navbar, loading animation, text animation, sliding menus, etc.?


r/csshelp • • May 28 '20

Resolved Does Reddit actually support 'var()' for subreddit stylesheets?

8 Upvotes

ok it's answered

yep looks like it doesn't support 'var()'

(thanks, u/nekosune!)


the tl;dr version

  • Does reddit actually support 'var()'?

  • And, if it is supported, what am I doing wrong?


the long version

On r/worldpolitiCSSarea (yes, worldpolitiCSS was taken several years ago, and I know that the admins won't grant it for CSS testing via redditrequest), I'm trying out some stuff to allow header banners to be changed, and it currently works as intended.

So, for ease of maintainability, I was attempting to implement some var() stuff, so, if banners get added/removed, or if we wanted to change the time spent between banners changing, instead of needing to recalculate all the keyframe times/total animation length/etc, we could just change the values held by the variables, solving that problem for us.

So, I attempted to define some variables as follows:

:root{
    /* setting some custom variables */
    
    /* replace this with the number of banners being used */
    --banner-count:6;
    
    /* replace this with the time to wait on each banner */
    --banner-delay:30s; 
}

and then, within the #header tag, I tried to access them as follows:

animation-duration: calc( var(--banner-count) * var(--banner-delay) );
animation-delay: calc( var(--banner-delay) / 2);

(didn't get around to attempting the keyframe stuff just yet)

and then, upon pressing 'preview', I was greeted with

syntax error: Expected <ident> for declaration name, got literal.

for the variable definitions, and

unknown function "var" 

for when I was trying to access them.

So, as I couldn't find any answers about whether or not reddit actually supports 'var()', or if I'm just doing something wrong, I'm asking for help here. (if nothing else, it might be useful for the next person who finds themselves in this situation).

  • Does reddit actually support 'var()'?

  • And, if 'var()' is supported, what am I doing wrong?


r/csshelp • • Apr 07 '20

Resource Let's understand the line-height CSS property in simple terms

8 Upvotes

A line-height is widely used but misunderstood css property. Today, in this article, I am explaining line-height property in concise way with an example. 

Please do have a look.

https://medium.com/@kedarisamols/best-of-line-height-2c101546cd21


r/csshelp • • Feb 29 '20

Resolved Change a font colour on a white label

8 Upvotes

Hi, I'm hoping someone can help me with this conundrem. It should be a simple fix - I just want to change the colour of a font, on a white label however I've now spent close to two days changing stuff and can't figure it out, so would like a fresh set of eyes if anyone is a wizz.

The page is this one

The font colour I wish to change is the white font above each search box:
Origin|Destination|Depart Date|Return Date etc

Then below the main blue search button "search hotels"

Here's the css template

<style type='text/css'>
  .TPWL-widget .TPWL-front-content {
    max-width: 948px;
    margin: auto;
    padding: 0;
    }
    }
    h1 {
      font-size: 24px;
      line-height: 1.29;
      font-weight: 400;
      margin-bottom: 20px;
      color:#2a90df
    }
    a {
      color: #2a90df;
    }
    h2 {
      font-size: 20px;
      line-height: 1.29;
      font-weight: 400;
      margin: 30px 0 15px;
      color: #323232;
    }
    table {
      border: 1px solid #808080;
      border-collapse: collapse;
      border-spacing: 0;
      font-size: 14px;
      th {
        background-color: #f5f5f5;
        text-align: left;
        border: 1px solid #eee;
        padding: 4px 12px;
        vertical-align: top;
        font-weight: bold;
      }
      td {
        border: 1px solid #eee;
        padding: 4px 12px;
        vertical-align: top;
      }
      tr {
        background-color: #fafafa;
      }
      tr:nth-of-type(even) {
        background-color: #323232;
      }
    }
  }

  .TPWL-widget .TPWL-front-content .TPWL-front-content_attention {
    padding: 10px 10px;
    background-color: #f6f9ff;
    border: 1px solid #f8f6e6;
    color: #444;
    border-radius: 4px ;
    margin-bottom: 20px ;
    font-size: 16px;
    line-height: 25px;
    font-weight: 500;
  }
  .TPWL-widget .TPWL-front-content .TPWL-front-content_text-list {
    background-image: none;
    margin: 10px 10px 10px 30px;
    list-style-type: disc;
    color: #757575;
    font-size: 16px;
    line-height: 24px;
  }
  .TPWL-widget .TPWL-front-content-weedle-title,
  .TPWL-widget .TPWL-front-content-subscription-title,
  .TPWL-widget .TPWL-front-content-special_offers-title {
    text-align: center;
    font-size: 32px;
    margin-bottom: 36px;
    margin-top: 60px;
    font-weight: 300;
  }
  .TPWL-widget .TPWL-front-content-weedle {
    text-align: center;
    margin-right: -21px;
  }
  .TPWL-widget .TPWL-front-content-weedle-container {
    display: inline-block;
    width: 300px;
    margin: 10px 21px 10px 0;
  }
  .TPWL-widget .weedle-header__city {
    text-align: center;
  }

  .TPWL-footer-content {
    margin: 15px auto 40px;
    text-align: center;
    font-size: 14px;
  }
  .TPWL-footer-content__descrition {
    margin-top: 5px;
    opacity: .6;
  }
  .TPWL-header-content-wrapper {
    width: 100%;
    margin: 0 auto;
    max-width: 1024px;
  }
  .TPWL-header-content {
    padding-top: 45px;
    padding-bottom: 10px;
  }

  .TPWL-header-content .TPWL-header-content__descrition {
    padding-right: 15px;
    float: right;
    line-height: 23px;
    font-weight: 300;
    font-size: 14px;
  }

  .TPWL-header-content .TPWL-header-content__label {
    display: none;
    font-size: 36px;
    margin: 0 auto;
    max-width: 1024px;
    padding: 95px 0px 0px 15px;
  }
  .TPWL-widget--front_page .TPWL-header-content .TPWL-header-content__label {
    display: block;
  }

  .TPWL-header-content .TPWL-header-content__logo {
    padding-left: 15px;
    display: inline;
    line-height: 24px;
  }
  .TPWL-header-content .TPWL-header-content-logo-link {
    text-decoration: none;
  }
  .TPWL-header-content .TPWL-header-content-logo__text {
    padding-left: 40px;
    color: #FFFFFF;
    font-size: 24px;
    font-weight: 900;
    text-transform: uppercase;
  }
  .TPWL-header-content .TPWL-header-content-logo__img {
    position: absolute;
    width: 30px;
    height: 30px;
    background: no-repeat url("data:image/svg+xml, https://jadejackson.com.au/wp-content/uploads/F4BB9E6E-470B-4D85-9EF0-2C8324068FE8_4_5005_c-1-e1582952087346.jpeg");
  }

  .TPWL-widget--front_page .TPWL-template-header {
    padding-bottom: 145px;
  }
  .TPWL-widget--front_page .TPWL-template-search-results {
    display: none;
  }

  .TPWL-widget--front_page .TPWL-template-header.TPWL-template-header--sticky {
    padding: 0;
  }
  @media (max-width: 1024px) {
    .TPWL-widget--front_page .TPWL-template-header.TPWL-template-header--sticky {
      display: none;
    }
  }
  @media (max-width: 1001px) {
    .TPWL-widget .TPWL-front-content {
      padding: 0 30px;
    }
    .TPWL-widget .TPWL-template-header-content {
      max-width: 1024px;
    }
    .TPWL-header-content .TPWL-header-content__descrition {
      padding-right: 10px;
    }
    .TPWL-header-content .TPWL-header-content__label {
      padding: 75px 0 0 15px;
    }
    .TPWL-header-content .TPWL-header-content__logo {
      padding-left: 10px;
    }
    .TPWL-widget--front_page .TPWL-template-header {
      padding-bottom: 90px;
    }
  }
  @media (max-width: 790px) {
    .TPWL-widget .TPWL-front-content {
      padding: 0 20px;
    }
    .TPWL-widget--front_page .TPWL-template-header {
      padding-bottom: 25px;
    }
    .TPWL-header-content .TPWL-header-content__label {
      font-size: 24px;
      padding-bottom: 0px;
      padding-top: 91px;
    }
    .TPWL-widget .TPWL-front-content-weedle {
      margin: 0px;
    }
  }
  @media (max-width: 460px) {
    .TPWL-widget .TPWL-front-content {
      padding: 0 10px;
    }
    .TPWL-header-content {
      text-align: center;
      padding-bottom: 0px;
      padding-top: 20px;
    }
    .TPWL-header-content .TPWL-header-content__descrition {
      padding-right: 0px;
      float: none;
      display: block;
    }
    .TPWL-header-content .TPWL-header-content__label {
      padding: 0;
      display: none;
    }
    .TPWL-header-content .TPWL-header-content__logo {
      padding-left: 0px;
      display: block;
    }
    .TPWL-widget--front_page .TPWL-template-header {
      padding-bottom: 0px;
    }
    .TPWL-widget .TPWL-front-content-weedle {
      margin: 0px;
    }

    .TPWL-widget .TPWL-front-content-weedle-container {
      display: inline-block;
      width: 250px;
      margin: 10px 0 10px 0;
    }
  }
  @media (max-width: 340px) {
    .TPWL-widget .ducklett-widget .ducklett-widget-wrapper--brickwork .ducklett-widget-wrapper-item {
      margin: 0 0 20px 0!important;
    }
    .TPWL-widget .ducklett-widget .ducklett-slider-wrapper {
      overflow: visible !important;
    }
  }
</style>

What am I missing?

Ive found out how to change every font except that one.

Thanks a bunch in advance, really appreciate it.

Cheers,

:-)


r/csshelp • • Jan 23 '20

How can i make this User Status [online/offline] ?

8 Upvotes

t h i s / i d e a

And if the user it's offline, the bubble should be grey

I wanted to search on the internet but i don't have the perfect word for this...


r/csshelp • • Jan 13 '20

Resolved i want a rainbow animation flair for my sub anyone who i can copy paste it from i tried another one but didnt work

8 Upvotes

r/csshelp • • Jan 09 '20

Request [Non-Reddit] Flexbox layout without control of HTML

8 Upvotes

I have the following HTML and am wondering if a certain layout like this is possible using only Flexbox.

<div>
    <img>
    <header></header>
    <div></div>
    <footer></footer>
</div>

I'm looking for this kind of layout:

      || header
img   || div
      || footer

I realize that I could wrap the header, content, and footer in a container element but I don't have the ability to change the HTML as it's dynamically generated and I can't just use float: left; on the image because then the text wraps underneath it. No matter what options I've tried, I can't seem to get it to float the image to the left with the content on the right.

Any thoughts would be helpful. If that's not possible, I'll need to try and work with a vendor to fix this and change the HTML being generated which will likely not happen.

Thanks in advance!


r/csshelp • • Jul 15 '19

Resolved How do I make our CSS smaller?

8 Upvotes

I am very much a novice at CSS and mostly just copy and paste already existing things to make it do what I need it to. Problem is that the CSS for our subreddit (/r/mls) is not too big after my latest edition. Is there a way to clean up and shorten/reduce the CSS? What I'm trying to add can be found here (raw github). Any and all help is appreciated.


r/csshelp • • Nov 29 '18

Resolved I want to make my subreddit more accessible to people who like using night mode

8 Upvotes

on r/despacitospiders i want to make a nightmode option how can i do this without using the redesign?


r/csshelp • • Oct 11 '18

Resolved How can I change the "a community for 6 years" in the subreddit sidebar to reflect a number of days from a different start date?

8 Upvotes

/r/bending

This subreddit has existed for 6 years but only had 4 subscribers and no posts until 35 days ago.

I'd like to reflect that it has been "a community for [Current Date – Sept 7 2018] days".

Is there a way to pull the current date with CSS, and is there a way to calculate the number of days since a certain date?

Thank you.


r/csshelp • • Oct 04 '18

r/Screenwriting (250,000 subs) is looking to bring at least 2 heavily experienced CSS mods to help with an overhaul on the old and redesigned Reddit.

8 Upvotes

Contact me if you have any experience with config roles on Reddit! Let me know if you have any questions.

https://www.reddit.com/r/Screenwriting/

This is a fairly large job, and we've had about 4 CSS mods drop out over personal issues and lack of availability. We want to bring on a decent amount of people to divvy up the work as much as possible. There is no deadline, but we'd love to get this out in the next month. If you do decide to join on this project, please make sure you'll be available to work consistently -- at least a handful of hours every few days.

  • Are you requesting a specific "theme" (entire sub designed around a color, modern look, dark look, etc)?

Definitely modern and clean. Lot's of white space, but there's plenty of ideas I have to beef up the user experience.

  • Do you need just a few simple things like user flair/link flair, header image, etc?

It started simple, but we've moved into some more heavy areas of development. Here are some examples of the stuff we may be working into our new design:

https://gyazo.com/8d34c738868a42c4266f49c620590c9c (all clickable buttons).

https://gyazo.com/9d4f5d6c8de9914cf7880e2ddc38bbad (the image that floats down, and the animated banner).

https://gyazo.com/dafefea4e5bf04a5516546eabad0a98f (the specially styled buttons, and the twitter button).

https://gyazo.com/42acafe1939883c2ead09edf932b4806 (that type of style for the rules section, and the hover stuff).

https://gyazo.com/9f9ca12406c07e5519bd3c5492c3e699 (the announcements bar).

https://gyazo.com/22410fc62914bf0ea57d21cf3ba7309e (the calendar).

https://gyazo.com/2b4c0e04e0b992b98cda694f91580982 (the drop menu).

  • Do you need more advanced CSS work done? (For example, drop-down menus, lang(), animations, etc.)

Definitely. I want to brainstorm some more advanced additions, and we will certainly be adding some.

  • Are you looking for a mod who can create custom art as well as implement it via CSS?

We've had previous mods who did a little graphic design and implement it into the sub. We have a very big project coming up the will require graphics implemented. Is this a good place to find willing graphic designers?


Hope these quick details give everyone a little more understanding of where we stand!


r/csshelp • • Feb 24 '18

Do I need to learn HTML before CSS to be a CSS (Reddit)Mod?

8 Upvotes

I am a mod of the Hindi subreddit. Right now, the sub has a simple look. I want the sub to be more detailed and pleasing to the eyes. I know that I need to know CSS to do that. But do I need to learn HTML before learning CSS?


r/csshelp • • Sep 30 '17

How do you add a special flair color to a celebrity user?

8 Upvotes

/r/mavericks mod here. Was thinking something like how /r/nba uses for /u/NBA and since we have Mark Cuban posting on our sub now I think our users would like a tag when he's posting.

I'd like something simple, like a colored box highlighting the username like when you distinguish as a mod, or how /u/nba is on /r/nba. How do I do this?

Thanks!


r/csshelp • • Jul 09 '17

I have no idea how to implement a CSS into my subreddit.

8 Upvotes

My subreddit is /r/paladinsstrategies and I want the CSS to look like https://www.reddit.com/r/ApicemLight/. HELP!!!


r/csshelp • • Nov 08 '16

Hello! I've made my subreddit r/REEEEEE shake rapidly upon opening up the subreddit. I'd like for my background image to shake along with the subreddit but idk how

8 Upvotes

I have the image I want to use as a background, the only issue is when I upload the image, the background wont shake along with the rest of the subreddit.

Is there any way to fix this?


r/csshelp • • Oct 28 '16

Best way to learn CSS from 0?

8 Upvotes

0 experience in CSS, I want to learn it.

I have seen across reddit the following websites: https://developer.mozilla.org https://www.codecademy.com/ http://learnlayout.com/

Which of the 3 is the best? Because in past experience learning code wrong on a website just messes up a lot with you and makes more hard to watch a right tutorial.


r/csshelp • • Sep 11 '16

New to CSS, how to add flair?

8 Upvotes

I'm working with a private sub right now, it looks horrid and I don't want to open it up, but pretty much all I have down is the banner and background color

The Stitches spritesheet generator is not working for me. The OPEN button is unresponsive, it just will not work and there is apparently no other way to add flair than going by the tutorial. I'm frustrated and ready to give up trying. I think the generator is uncompatible with my laptop or something, it just won't. Is there ANY other way to add flair to my subreddit? Or do I need to enlist someone as a mod to do it for me?

Any help at all is appreciated


r/csshelp • • Sep 09 '16

css fixes for the unannounced thumbnail and expando changes.

8 Upvotes

Hello everyone!

Today the admins roled out some css changes that basically breaks a bunch of styling across reddit with subreddit stylesheets and RES.

So in order to remedy that I set out to produce some css fixes that revert to the original situation.

For subreddit owners you can find the css fixes on this github page, installation is very simple.

  • Download the sprite image in this repository and copy the css.

  • Navigate to the /r/subreddit/about/stylesheet page of your sub.

  • Upload the sprite.

  • Paste in the css.

  • Hit save.

For people who want the fix across reddit I also made a stylish stylesheet. You can find it here.

For people wondering about the differences here is a before and after picture


r/csshelp • • Dec 18 '15

What are some fun "Easter eggs" that I can put into my subreddit?

8 Upvotes

Hi everyone. I'm a mod over at /r/nerfgerf and recently my subscribers have ben obsessed with Easter eggs, and I just started learning CSS a few days ago to make this subreddit look better so I don't really know what I can do. Some things I would like to try:

  • Moving the cursor over to the far left/right of the screen slides out an image.

  • Clicking on/hovering over the report button flashes an image to the screen.

  • Hovering over something makes all the text Comic Sans

  • Replacing certain words on the subreddit.

I don't know if that last one's possible, but I think I remember seeing some other subs do that a while ago. Anyway, any help is appriciated. Thank you.


r/csshelp • • Jul 27 '15

How can I remove the "created by __" and replace the "__" with a different username?

8 Upvotes

This is for /r/darkjokes. The previous threads I've found are from 2 or 3 years ago and didn't work.

Thanks.