Box modification via CSS

  • Betroffene Version
    WoltLab Suite 5.3

    I have a box that I have listed as Before Content on positioning.

    On inspecting element on the .boxContent it has a margin-top of 20px

    Code
    .boxTitle+.boxContent {
        margin-top: 20px;
    }

    The boxes ID is 22. How can I add a custom css !important to make the margin-top: 0?

    • Hilfreichste Antwort
    • Offizieller Beitrag

    Hello,

    You can't, because the ID is not exposed. However, each box has an identifier that is set in the template. Look for the parent element with class="box" and use the value of the identifier:

    CSS
    .box[data-box-identifier="insertHereWhateverValueItShowsInTheInspector"] .boxTitle + .boxContent {
        margin-top: 0;
    }

    Alexander Ebert
    Senior Developer WoltLab® GmbH

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!