Skip to Content
0

Crosstab: Text align in column header DS

Nov 07, 2016 at 05:28 PM

463

avatar image

Hi,

I want to Center the column headers of a crosstab, I have already used some CSS but it doesn't change. I have other crosstab with another datasourse and a similar CSS and it works.

At first the problem was that the text was hide column-header.jpg but only the ones of year keep in the same place, I solve it using some code and the final result is this text-alignment-in-header.jpg but the text alignment in center dont work.

Design Studio 16.1.2

This is the CSS I´m using

.sapzencrosstab-ColumnHeaderArea .sapzencrosstab-HeaderCellDefault,  
.sapzencrosstab-ColumnHeaderArea .sapzencrosstab-HeaderCellAlternating,  
.sapzencrosstab-DimensionHeaderArea .sapzencrosstab-HeaderCellAlternating,  
.sapzencrosstab-DimensionHeaderArea .sapzencrosstab-HeaderCellDefault {  
	text-align: center !important ;
	font-weight: Bold;
	border-collapse: collapse;
	color: white;
	background-image: none !important;  
        background-color: #0060ae !important; 
	border-left: none;
	border-right:  1px solid white;
	border-bottom: 2px solid white;
	font-size: 14px;
	height: 17px;
}  
.crosstab .sapzencrosstab-DataArea td {
	background-color: #D3D3D3;
	border-collapse: collapse;
	border-color: transparent;
	font-size: 14px;
	border-left: none;
	height: 17px ;
	color: black;
	line-height: 17px;
}
.crosstab .sapzencrosstab-RowHeaderArea td {
	text-align: Center !important;
	background-color: #D3D3D3; 
	border-collapse: collapse;
	border-color: transparent;
	font-size: 14px !important;
	font-weight: normal;
	border-right-width: 3px;
	border-right-color: white;
	height: 17px ;
	vertical-align: top;
	color: black;
	line-height: 17px;
}
.crosstab .sapzencrosstab-HeaderCellContentDiv { 
 	margin-top: 0px; 
	height: 17px; 
	line-height: 17px; 	
 }  
.crosstab .sapzencrosstab-HeaderCellDivHierarchy { 
        width: 0px;  
 	height: 0px;  
 	margin-right: 0px; 
 	margin-left: 0px; 
 } 

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Tammy Powlas
Nov 07, 2016 at 05:48 PM
0

What if you removed the font size and height? What theme are you using?

This is working for me:

.sapzencrosstab-DimensionHeaderArea .sapzencrosstab-HeaderCellDefault, .sapzencrosstab-ColumnHeaderArea .sapzencrosstab-HeaderCellDefault
{
white-space: normal;
word-wrap: break-word;
color:white;
text-align: center;


}
Show 2 Share
10 |10000 characters needed characters left characters exceeded

I'm using mobile theme,

This is the result without height and font size : without-height.jpg

I used the code above but it doesnt work

without-height.jpg (25.8 kB)
0

Did you try what Poovarasan suggested below "Disable the sorting and apply css"

0
Poovarasan Boopalan Nov 08, 2016 at 04:22 PM
0

Hi Maria,

The code given by Tammy is working for me, I think you may have enabled sorting in cross tab, It will not work then.

Disable the sorting and apply css.

Thanks,

Poovarasan

Share
10 |10000 characters needed characters left characters exceeded