Target a css class inside another css class

后端 未结 2 422
面向向阳花
面向向阳花 2021-02-01 11:26

Hi I am having problems with some css classes in joomla. I have two divs in a module, one is the wrapper class=\"wrapper\", the other is the content class=\"content\" . Content

2条回答
  •  失恋的感觉
    2021-02-01 12:11

    I use div instead of tables and am able to target classes within the main class, as below:

    CSS

    .main {
        .width: 800px;
        .margin: 0 auto;
        .text-align: center;
    }
    .main .table {
        width: 80%;
    }
    .main .row {
       / ***something ***/
    }
    .main .column {
        font-size: 14px;
        display: inline-block;
    }
    .main .left {
        width: 140px;
        margin-right: 5px;
        font-size: 12px;
    }
    .main .right {
        width: auto;
        margin-right: 20px;
        color: #fff;
        font-size: 13px;
        font-weight: normal;
    }
    

    HTML

    Swing Over Bed
    650mm
    Swing In Gap
    800mm

    If you want to style a particular "cell" exclusively you can use another sub-class or the id of the div e.g:

    .main #red { color: red; }

    Swing Over Bed
    650mm
    Swing In Gap
    800mm

提交回复
热议问题