The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Sticky / Pinned text background codes

Page 2 of 2 Previous  1, 2

View previous topic View next topic Go down

Sticky / Pinned text background codes

Post by APE on November 11th 2015, 10:12 pm

First topic message reminder :

Hi all Hello

i have this code i got from some place and it all works fine but i make a change to the Word Sticky to pinned now the pinned don't have a color background like it did when it was as sticky

i made a change to the code but still not showing
 

CSS Files:

Code:
  vertical-align:middle
}
a.topictitle {
  vertical-align:bottom
    padding-top:10px;
}
.an, .g-a,.sticky{
background-color: #3689D1;
background-image: url("http://i55.servimg.com/u/f55/14/73/12/96/highli10.png");
background-position: 0 -1px;
background-repeat: repeat-x;
border-radius: 3px;
color: #FFFFFF;
display: inline-block;
font-family: Verdana,Geneva,sans-serif !important;
font-size: 9px;
font-weight: bold;
height: 16px;
line-height: 16px;
padding: 0 5px;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);
text-transform: uppercase;
vertical-align: middle;
  border: 1px solid #CCC !important;
}

.p-l {
background-color: #00E600;
background-image: url("http://i55.servimg.com/u/f55/14/73/12/96/highli10.png");
background-position: 0 -1px;
background-repeat: repeat-x;
border-radius: 3px;
color: #FFFFFF;
display: inline-block;
font-family: Verdana,Geneva,sans-serif !important;
font-size: 9px;
font-weight: bold;
height: 16px;
line-height: 16px;
padding: 0 5px;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);
text-transform: uppercase;
vertical-align: middle;
border: 1px solid #CCC !important;
}

.M-L{
background-color: #660000;
background-image: url("http://i55.servimg.com/u/f55/14/73/12/96/highli10.png");
background-position: 0 -1px;
background-repeat: repeat-x;
border-radius: 3px;
color: #FFFFFF;
display: inline-block;
font-family: Verdana,Geneva,sans-serif !important;
font-size: 9px;
font-weight: bold;
height: 16px;
line-height: 16px;
padding: 0 5px;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);
text-transform: uppercase;
vertical-align: middle;
  border: 1px solid #CCC !important;
}
.P-D {
background-color: #00E600;
background-image: url("http://i55.servimg.com/u/f55/14/73/12/96/highli10.png");
background-position: 0 -1px;
background-repeat: repeat-x;
border-radius: 3px;
color: #FFFFFF;
display: inline-block;
font-family: Verdana,Geneva,sans-serif !important;
font-size: 9px;
font-weight: bold;
height: 16px;
line-height: 16px;
padding: 0 5px;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);
text-transform: uppercase;
vertical-align: middle;
border: 1px solid #CCC !important;
}
span.corners-bottom span {
    border-radius: 10px;
-webkit-border-radius: 10px;
-o-border-radius: 10px;
-khtml-border-radius: 10px;
}

Java Code:

Code:
//Sticky box code
        $(document).ready(function() {
        $('dd.dterm strong:contains("Sticky")').each(function(){
        $(this).addClass('sticky');
        });
        });
        $(document).ready(function() {
        $('dd.dterm strong:contains("Announcement")').each(function(){
        $(this).addClass('an');
        });
        });
        $(document).ready(function() {
        $('dd.dterm strong:contains("Global announcement")').each(function(){
        $(this).addClass('g-a');
        });
        });
$(document).ready(function() {
        $('dd.dterm strong:contains("Poll")').each(function(){
        $(this).addClass('p-l');
        });
        });
$(document).ready(function() {
        $('dd.dterm strong:contains("Moved")').each(function(){
        $(this).addClass('M-L');
        });
        });
        $(document).ready(function() {
        $('dd.dterm strong:contains("Pinned")').each(function(){
        $(this).addClass('P-D');
        });
        });

//END OF CODE

P-D is the code for Pinned Wink

what am i doing wrong ?

Much thanks to anyone that can help Wink

APE





APE
Manager
Manager

Male Posts : 8309
Reputation : 716
Language : fluent in dork / mumbojumbo & English haha
Location : STUCK IN FORUMOTIONS SERVERS HELP ME !!!!!!

http://chatworld.forumotion.co.uk/

Back to top Go down


Re: Sticky / Pinned text background codes

Post by APE on November 19th 2015, 2:32 am

yes it works fine when its called Sticky but as soon as i call it pinned again Bam it's not working

is there away i can change the name sticky in the CSS to pinned then make the code work that way i think making it by adding it to the ACP settings is not really changing it to its own name just masking it





APE
Manager
Manager

Male Posts : 8309
Reputation : 716
Language : fluent in dork / mumbojumbo & English haha
Location : STUCK IN FORUMOTIONS SERVERS HELP ME !!!!!!

http://chatworld.forumotion.co.uk/

Back to top Go down

Re: Sticky / Pinned text background codes

Post by Luffy on November 19th 2015, 2:33 am

Remove the text Pinned to give it a try! Smile






Luffy
Manager
Manager

Male Posts : 4035
Reputation : 407
Language : Greek, English
Location : Greece

http://www.thinktankforum.net

Back to top Go down

Re: Sticky / Pinned text background codes

Post by APE on November 19th 2015, 2:35 am

yes see now the sticky is there and it has the background





APE
Manager
Manager

Male Posts : 8309
Reputation : 716
Language : fluent in dork / mumbojumbo & English haha
Location : STUCK IN FORUMOTIONS SERVERS HELP ME !!!!!!

http://chatworld.forumotion.co.uk/

Back to top Go down

Re: Sticky / Pinned text background codes

Post by Luffy on November 19th 2015, 2:42 am

Yes this is a lot easier lol
Add in your CSS:
Code:
.sticky {
    font-size: 0;
    background: #51D43E;
}
.sticky::before {
    content: "Pinned:" !important;
    font-size: 9px;
    font-weight: bold;
}






Luffy
Manager
Manager

Male Posts : 4035
Reputation : 407
Language : Greek, English
Location : Greece

http://www.thinktankforum.net

Back to top Go down

Re: Sticky / Pinned text background codes

Post by APE on November 19th 2015, 2:45 am

lol that sort of worked it's now called pinned:sticky Razz





APE
Manager
Manager

Male Posts : 8309
Reputation : 716
Language : fluent in dork / mumbojumbo & English haha
Location : STUCK IN FORUMOTIONS SERVERS HELP ME !!!!!!

http://chatworld.forumotion.co.uk/

Back to top Go down

Re: Sticky / Pinned text background codes

Post by Luffy on November 19th 2015, 2:46 am

Yes yes i saw that! Try adding to the class .sticky the !important to
Code:
font-size:0 !important;






Luffy
Manager
Manager

Male Posts : 4035
Reputation : 407
Language : Greek, English
Location : Greece

http://www.thinktankforum.net

Back to top Go down

Re: Sticky / Pinned text background codes

Post by APE on November 19th 2015, 2:49 am

Very good cheers it worked thank you @Luffy Shake 1st





APE
Manager
Manager

Male Posts : 8309
Reputation : 716
Language : fluent in dork / mumbojumbo & English haha
Location : STUCK IN FORUMOTIONS SERVERS HELP ME !!!!!!

http://chatworld.forumotion.co.uk/

Back to top Go down

Re: Sticky / Pinned text background codes

Post by Luffy on November 19th 2015, 2:50 am

Yayyy!!! Hehehe, for it's background do the same with the !important and it'll change!! Smile






Luffy
Manager
Manager

Male Posts : 4035
Reputation : 407
Language : Greek, English
Location : Greece

http://www.thinktankforum.net

Back to top Go down

Re: Sticky / Pinned text background codes

Post by APE on November 19th 2015, 2:52 am

you really Don't know how hard that was and me really loosing sleep over it it's now 1:51 for me in the uk work at 7am Sad

anyway thanks again now my mind at rest lol

THAHK YOU





APE
Manager
Manager

Male Posts : 8309
Reputation : 716
Language : fluent in dork / mumbojumbo & English haha
Location : STUCK IN FORUMOTIONS SERVERS HELP ME !!!!!!

http://chatworld.forumotion.co.uk/

Back to top Go down

Re: Sticky / Pinned text background codes

Post by Luffy on November 19th 2015, 2:53 am

Hehehe here it's 3.53am so im worst! lol i get up at 7 for my uni at 8 lol! Enjoy!






Luffy
Manager
Manager

Male Posts : 4035
Reputation : 407
Language : Greek, English
Location : Greece

http://www.thinktankforum.net

Back to top Go down

Re: Sticky / Pinned text background codes

Post by APE on November 19th 2015, 2:54 am

Topic solved and archived





APE
Manager
Manager

Male Posts : 8309
Reputation : 716
Language : fluent in dork / mumbojumbo & English haha
Location : STUCK IN FORUMOTIONS SERVERS HELP ME !!!!!!

http://chatworld.forumotion.co.uk/

Back to top Go down

Page 2 of 2 Previous  1, 2

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum