r/csshelp • u/ofnoaccount • Apr 02 '12
Positioning of Tags
I just added some color coded tags to [my subreddit](/r/HITsWorthTurkingFor and I'm having trouble with their positioning in Firefox (but not in Chrome) when not running RES. From messing with Firebug, it seems as though the .title a { position: relative; rule is not being followed or otherwise overridden. I could be mistaken though. The same issue seems to occur on /r/AskElectronics from which I adapted the code.
Here's what I have in place:
/* Color Coded Tag formatting - adapted from r/AskElectronics */
.title a {
position: relative;
}
.title a:before {
display: none;
position: absolute;
border-radius: 20px;
border-color: black;
color: Gainsboro;
padding-left: 13px;
padding-right: 13px
}
.title a[href*="/us"] {
padding-left: 20px
}
.title a[href*="/ica"] {
padding-left: 20px
}
.title a[href*="/announcement"] {
padding-left: 20px;
position: relative
}
.title a[href*="/us"]:before {
display: block;
content: "US";
background-color: green
}
.title a[href*="/ica"]:before {
display: block;
background-color: red;
content: "ICA"
}
.title a[href*="/announcement"]:before {
content: "Announcement";
display: block;
background-color: orangered;
font-weight: bold;
}Thank you in advance for any suggestions!