Skip to Content
avatar image
Former Member

Change display for one crosstab only

Hello people,

I have one question : is it possible to modify the display of a crosstab ? And only one !

Here the css i want to use for this one crosstab (in this exemple, it will works for all crosstab) :

.sapzencrosstab-HeaderCellDefault  .sapzencrosstab-DataArea, .sapzencrosstab-DimensionHeaderArea, .sapzencrosstab-ColumnHeaderArea

{

  font-size : 10px;

  height : 10px;

}

.sapzencrosstab-DataCellDefault, .sapzencrosstab-HeaderCellDefault{

  height: 10px;

}

.sapzencrosstab-DataCellContentDiv , .sapzencrosstab-RowHeaderArea

{

  font-size : 10px;

}

How can i use this CSS as one CSS Class and apply it for a crosstab without modifying another one ?

Thanks all !

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Oct 27, 2015 at 07:53 AM

    Hi !

    Thank both for your answer.

    I tried your solution but it don't work.

    For exemple, i created a css class .crosstab10, put it for one crosstab, but still all my crosstabs are impacted by this css..

    Here my class :

    .crosstab10 .sapzencrosstab-HeaderCellDefault  .sapzencrosstab-DataArea, .sapzencrosstab-DimensionHeaderArea, .sapzencrosstab-ColumnHeaderArea, .sapzencrosstab-DataCellDefault, .sapzencrosstab-DataCellContentDiv , .sapzencrosstab-RowHeaderArea

    {

      font-size : 10px;

      height : 10px;

    }

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Jean,

      Its absolutely possible in css to make selector like this, however please make sure the selection selectors are right. For example,

      <div class="a">
      <div class="b">B
      </div>
      <div class="c">C
      </div>
      </div>
      

      CSS would be,

      .b,.c{
          color:red;
      }
      

      which makes class b and c as color red. you can check the result Edit fiddle - JSFiddle. Again, just make sure your selectors are right  😉

      Thanks,

      Nithyanandam

  • Oct 26, 2015 at 05:24 PM

    Hi Jonas,

    It is absolutely possible. Just add a classname to the crosstab in property sheet and append the class name before your css. For example,

    .yourclassname .sapzencrosstab-DataCellContentDiv , .sapzencrosstab-RowHeaderArea

    {

      font-size : 10px;

    }


    Thanks,

    Nithyanandam

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 27, 2015 at 02:46 AM

    Hi Jonas,

    Besides class selector, you can use id selector too.

    For example,

    #CROSSTAB_1 .sapzencrosstab-DataCellDefault, .sapzencrosstab-HeaderCellDefault{

      height: 10px;

    }

    Best,

    Alfred

    Add comment
    10|10000 characters needed characters exceeded