Tagged: x
-
AuthorPosts
-
October 2, 2016 at 9:29 am #1199313
ZerotoOneParticipanthey 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!
October 2, 2016 at 9:37 am #1199319
ChristianModeratorHey 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-headlineas the common selector and.no-1as the unique one. With that, you can put all common styles in.my-headlineThanks.
October 2, 2016 at 10:31 am #1199364
ZerotoOneParticipantsorry my englisch is not that good..I’am from germany, could you send me the shortened css please? 🙂
October 2, 2016 at 10:40 am #1199371
RupokMemberHi 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!
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1199313 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
