• Resolved MarionFW

    (@marionfw)


    somehow I’m not getting the css-code for table width in pdb_single right: when I check in Firebug I see this code:

    .pdb-single dt {
      float:left;
      font-weight:bold;
      margin:0 10px 1.625em 0;
      width:140px;
    }

    I added this to my child theme css:

    .pdb single dt {
       width:240px;
    }

    but somehow it does not work. Apparently there’s something missing. I studied the css-tutorial on xnau.com, and tried several things, but did not find the solution.
    I don’t suppose this is influenced by the add-on Field Group Tabs?

    Hope someone can help, because label and entry are now overlapping, so the text isn partly “entangled”

    https://wordpress.org/plugins/participants-database/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author xnau webdesign

    (@xnau)

    One of the rules of CSS is that if two CSS rules have the same selector, the last one loaded will take precedence. Your rule isn’t overriding the existing rule because your child theme stylesheet is loading before the plugin stylesheet. Since it’s usually impossible to alter which stylesheet is loaded first, the usual way to make your new rule override the old rule is to add more specificity in the selector. (in other words, add more terms, such as classnames, that define the target)

    There is perhaps an easier way…the Participants Database plugin has a “custom CSS” setting where you can put your rules to alter the plugin layout. These rules are loaded later than the plugin stylesheets, so they will usually override.

    Try putting your rule in the plugin custom CSS, should work there.

    Thread Starter MarionFW

    (@marionfw)

    Hi Roland, that works fine. I was hoping to keep all css-changes in one document, but I understand that is unnecessarily complicating things.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘css in pdb_single’ is closed to new replies.