CSS not allowed

KevinThomsen
edited May 2013 in General Archive
I tried to upload this css:

h2.description-header{
display:none;
}

to get rid of the giant "Description" header at the top of character pages, but the uploader rejects this css every time. What am I doing wrong?
Thanks.

Comments

  • madartiste
    madartiste
    Posts: 328 edited May 2013
    Hmm. Something about "description-header" is causing OP to read the code as being javascript or something. I pulled that part out and it runs just fine. Not sure what's up... I'll investigate some more, but I can't make any promises.

    EDIT: Looks like the word "description" is what's causing the problem since I tried that class as well. Also OP doesn't allow the use of > for targeting child elements...

    EDIT: This should do what you're looking for, but spend some time testing it. I didn't get the chance to examine all the things that it might decide to make display:none. Basically, the h2s in the 4th DIV in the campaign-content section will have the "display:none" property applied to it. I don't believe you can actually add anything until you get to the Description portion anyway, so it should be alright. But just in case, keep an eye out.
    @.character-page #campaign-content div:nth-of-type(4) h2 {
    display:none;
    }@

    There's probably an easier way to do this, but with the problems that using "description" in the css seems to cause, I'm having trouble spotting it.
    Post edited by madartiste on
  • saethone
    saethone
    Posts: 153
    the css filters anything with "script" in it i believe
  • madartiste
    madartiste
    Posts: 328 edited May 2013
    Ooooh, I'd seen the "script" rejection before, but it didn't occur to me that's why it was bouncing "description" too. Man. That's a pretty aggressive filter. Thanks for pointing that out, saethone.
    Post edited by madartiste on
  • saethone
    saethone
    Posts: 153
    yeah no problem, caused me some headaches too lol
  • wolfhound
    wolfhound
    Posts: 354
    SCRIPT... ok, now it makes sense. Description never did.
  • Gwythinn
    Gwythinn
    Posts: 2
    I would recommend something like this:

    h2[class*="cription-header"]

    That way if divs are added or removed and the one you want is no longer in the same place but still has the same class on it, this will still work.
  • saethone
    saethone
    Posts: 153 edited December 2013
    Excellent, I had no idea you could use wildcards with CSS! Did some searching, here's some more info on the syntax for those interested:

    http://stackoverflow.com/questions/5110249/wildcard-in-css-for-classes

    "Theophagie":https://theophagie.obsidianportal.com/ - Houseruled D&D 3.5 in Alternate History Earth
    "Zeroed":https://zeroed.obsidianportal.com/ - GURPS Cyberpunk-Sci-Fantasy
    Post edited by saethone on
  • madartiste
    madartiste
    Posts: 328
    Gwythinn, that's awesome! Never occurred to me to check to see if you could do wildcards with CSS. Thanks!
Sign In or Register to comment.

June 2022
Baldur's Gate

Read the feature post on the blog
Return to Obsidian Portal

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Discussions