콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
2 답글
19636 화면

Hi,

Could someone please tell me how to center the header of a tree view . I've tried to use a class css with the attribute text-align:center and noted it in the field (xml).

But this didn't work.

아바타
취소
작성자 베스트 답변

Hi,

you can try to do so that was helpful for me

Using selector [data-id="my_field"]====> for a specific th tag and [data-field="my_field"] ====>for specefic td tag

Add the following code in your custom css file

[data-id="my_field"]
{
   /*css properties */  
}

[data-field="my_field"]
{
    /*css properties */
}
아바타
취소

Thanks @ ZEeineb

베스트 답변

Hello,

In openerp-web -> addons -> web -> static -> src -> base.css you can find out following class :

.openerp th { font-weight: bold; vertical-align: middle; }

Modify this class by adding : text-align: center;

After modification refresh the browser, The header of tree view is aligned to 'center'.

아바타
취소
작성자

Thank you for your answer.

작성자

The concern is that we apply a CSS style to the whole list so all the titles in this list will be centered or right where the same for all values ​​will be centered or right or left. Can we apply a style for a specefic tree or for specefic titles on the tree? Thank you.

@Hiral Patel, can we change the css alignment only for a particular tree?

It may be possible to apply for particular module by extend particular template, add class to <thead>, but not sure about this.

관련 게시물 답글 화면 활동
4
3월 24
13473
1
7월 22
11384
12
8월 20
24285
1
3월 15
12043
0
3월 15
3998