• REGISTRATION REQUIREMENTS:

    Your username here MUST MATCH your XenForo username (connected to your XF license).

    Once you have registered here, then you need to start a conversation at xenforo.com w/Bob and provide the following:
    1. Your XenForo License Validation Token
    2. The Domain Name associated with the License
    NOTE: Your account will be validated once ALL requirements are verified/met. Thank you for your patience.

css question

SneakyDave

Member
Sportsbook
I hate workin with css, but I'm trying to just change the color of the status span.

From Chrome inspector, I just want to change the backgroun-color, font-size, and color of this element.
Code:
.sportsbookEventListItem .main .status .open {
font-size: 9px;
float: right;
color: #80C480;
background-color: #EDFAED;
border: 1px solid #80C480;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
-khtml-border-radius: 3px;
border-radius: 3px;
padding: 1px 2px;
margin-top: 3px;
margin-left: 5px;
}

I try to put this in EXTRA.css

Code:
.sportsbookEventListItem .main .status .open {
font-size: 10px !important;
color: #eeeeee !important;
background-color: #ff0000 !important;
}

But it doesn't change the span. I can see my css that I'm trying to use to override in Chrome inspector, but it must be being overwritten somehow.

Is it better to just change the SportsbookER templates themselves?
 
I cut and pasted your CSS into EXTRA.css and it worked just fine. As you can see, it is using the RED background instead of the lightish green (the most obvious of the 3 changes).

You sure you were viewing the right "style"?



Selection_391.png
 
Is it better to just change the SportsbookER templates themselves?

I wouldn't say "better", but you CAN if you want to. In this particular case, its easier to override via extra css as each pages CSS file would have to be edited (this is so you can have different looks for different area's). Just don't make changes to the MASTER templates as those get overridden on upgrade (as do all core XF MASTER TEMPLATES).
 
Yeah, correct style. It must be a caching problem then, or the "store templates as files" issue. Seems to always happen on EXTRA.css, but never in the style properties. Will turn that shit off while I'm doing that stuff. Doesn't help that I'm using libmemcached, templates as files, and Cloudflare all at once.

EDITed to add, yeah, that's what it was, some caching thing, what a PITA
 
Someone that was using cloudflare was having an almost identical issue. They ended up having to clear cache on cloudflare (I don't use it so I am not 100% sure if that is the correct terminology lol). I don't use any caching on my Development environments for this exact reason. Drives me nuts when developing and CACHING kicks in lol
 
Yeah, you can turn on "development mode" with Cloudflare too, but normally I don't have to do that. Just depends on the template I think, and the timing.
 
ok, here's another one. I thought this was an easy change, but it messed up another element using the same class.

I want to just change the color of this banner to blue, for example.


upload_2014-12-9_9-52-22.png

It uses the "open" class:
upload_2014-12-9_9-54-33.png

I tried to use this:
Code:
.strong .sportsbookStatusIndicator .open{
    background-color: blue !important;
}

But that doesn't change it at all. I can change it with this:
Code:
.open{
    background-color: blue !important;
}

But that's a pretty generalized class, and this element is affected.
upload_2014-12-9_9-58-54.png

So I just want to change the "open" class that is part of the sportsbookStatusIndicator, but I can't figure out what the correct CSS would be.
 
HTML:
.nflj_sportsbook_event .open
{
    background-color: blue;
    border-color: blue;
}

.nflj_sportsbook_event .open span
{
    background-color: blue;
}
 
That class is the first PARENT class available to the .open class on that particular template. .parent .child

.sportsbookStatusIndicator is in the same element as .open so you can't reference is as the parent class.

.sportsbookStatusIndicator.open (space removed) will work as well
HTML:
.sportsbookStatusIndicator.open
{
    background-color: blue;
    border-color: blue;
}

.sportsbookStatusIndicator.open span
{
background-color: blue;
}
 
where there are 2 CSS classes in the same element and you want to use them as "identifiers" you have to concatonate them..

<div class="sneaky dave"> <span>blah blah blah></span></div>

.sneaky.dave span
{
font-size: 12pt;
font-weight: bold;
}
 
oh, I got it now, I was just using .sportsbookStatusIndicator.open incorrectly. If I just would have looked at the chrome tool more closely....

Christ, I need a css lesson.
 
Back
Top