Hi All,
in a cell with an text-object the css-format
text-align:center; works
but
Is there any way to bring the text vertical in the middle?
thx for hints
br harry
Request clarification before answering.
Hi Harry,
I created 2 css classes which you can both try out.
Add the following CSS to your custom css file and add 2 grid components to your bi app where you can test and compare both css classes side by side at the same time while resizing your browser dimensions with your mouse:
/* CSS START */
/* VERTICAL-ALIGN: GRID-STYLE-1 */
.grid-style-1 td {border: 1px solid black;}
.grid-style-1 td span {border: 1px solid red;}
.grid-style-1 td,
.grid-style-1 td div,
.grid-style-1 td span {min-width: 80px; min-height: 22px;} /* adjust if needed */
.grid-style-1 td div {position: relative; width: 100%; height: 100%; line-height: 100%;}
.grid-style-1 td span {
position: absolute; top: 0; bottom: 0; margin: auto;
text-align: center !important;
width: 100% !important;
height: 22px !important; line-height: 22px !important; /* adjust if needed */
}
/* VERTICAL-ALIGN; FIXED TABLE ROW/CELL HEIGHT: GRID-STYLE-2 */
.grid-style-2 td {border: 1px solid green;}
.grid-style-2 td span {border: 1px solid blue;}
.grid-style-2 tr,
.grid-style-2 td,
.grid-style-2 td div,
.grid-style-2 td span {height: 50px !important; max-height: 50px !important; min-height: 50px !important; line-height: 50px !important; min-width: 80px;} /* adjust if needed */
/* last row is not shown (is made invisible) and changes/increases/decreases height automatically on browser resize,
so that the other table rows can maintain their height and don't have to adjust to the tables new height dimensions */
.grid-style-2 tr:last-child {height: 100% !important; max-height: 100% !important;}
.grid-style-2 tr:last-child td {border: none;}
.grid-style-2 td div {
display: table;
width: 100%;
}
.grid-style-2 td span {
display: table-cell;
text-align: center !important;
width: 100% !important;
}
/* CSS END */
Regards
David
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Harry,
There are 2 css classes with the following names that can be applied (copy/paste name) for GRID LAYOUT components:
Here is a screenshot of the GRID settings I have in my example for testing purposes (you can see what css classes I applied):
I can't upload/attach the whole bi app, because there is no suitable allowed file extension (content type) that I could use.
Regards
David
| User | Count |
|---|---|
| 10 | |
| 5 | |
| 5 | |
| 5 | |
| 5 | |
| 2 | |
| 2 | |
| 2 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.