Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1199313
    ZerotoOne
    Participant

    hey there,
    Id liken to shorten my css, since the styling is pretty much the same, except for the content

    .my-headline {
      padding-left: 45px;
      position: relative;
    }
    
    .my-headline::before {
      content: "01.";
      font-size: 63px;
      left: 0px;
      opacity: 0.2;
      letter-spacing: -5px;
      position: absolute;
      top: -5px;
    }
    .my-headline-2 {
      padding-left: 50px;  
      position: relative;
    }
    
    .my-headline-2:before {
        content: "02.";
        font-size: 63px;
        left: 0px;
        opacity: 0.2;
        letter-spacing: -5px;
        position: absolute;
        top: -5px;
    }
    .my-headline-3 {
      padding-left: 50px;  
      position: relative;
    }
    
    .my-headline-3:before {
        content: "03.";
        font-size: 63px;
        left: 0px;
        opacity: 0.2;
        letter-spacing: -5px;
        position: absolute;
        top: -5px;
    }
    .my-headline-4 {
      padding-left: 50px;  
      position: relative;
    }
    .my-headline-4:before {
        content: "04.";
        font-size: 63px;
        left: 0px;
        opacity: 0.2;
        letter-spacing: -5px;
        position: absolute;
        top: -5px;
    }
    .my-headline-5 {
      padding-left: 50px;  
      position: relative;
    }
    
    .my-headline-5:before {
        content: "05.";
        font-size: 63px;
        left: 0px;
        opacity: 0.2;
        letter-spacing: -5px;
        position: absolute;
        top: -5px;
    }
    .my-headline-6 {
      padding-left: 50px;  
      position: relative;
    }
    .my-headline-6:before {
        content: "06.";
        font-size: 63px;
        left: 0px;
        opacity: 0.2;
        letter-spacing: -5px;
        position: absolute;
        top: -5px;
    }

    Thanks for your help!

    #1199319
    Christian
    Moderator

    Hey there,

    You should separate the selectors or you should have a common selector and a unique one for your elements. For example, you can use .my-headline as the common selector and .no-1 as the unique one. With that, you can put all common styles in .my-headline

    Thanks.

    #1199364
    ZerotoOne
    Participant

    sorry my englisch is not that good..I’am from germany, could you send me the shortened css please? 🙂

    #1199371
    Rupok
    Member

    Hi there,

    In that case, the CSS needs to be re-written and it would be confusing for us to re-write in order to shorten this. If you can’t figure out that, I’d suggest to keep this as is since it’s not that heavy. Unless it’s hundreds of lines, it won’t affect the performance. So let’s keep the current code.

    Thanks!

  • <script> jQuery(function($){ $("#no-reply-1199313 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>