Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
3 Trả lời
3533 Lượt xem

On the e-learning platform, when I put in full screen, my text is stuck to the left border, where there is the menu. How can I add padding to the left and right of my text?

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hello Joanna Huart,

Please find below code it may help you to resolve this issue.

Please find Example in comment. 

I hope this can help you.

Thanks & Regards,
Email:   odoo@aktivsoftware.com 

Skype: kalpeshmaheshwari

Ảnh đại diện
Huỷ bỏ

Please find code here :-

First you can add a test in any html tag and set class for add css style.
Add class, class name="text-styling" add margin/border to text add this style tag code in css file.

<p class="text-styling">Your text goes here</p>

<style>
.text-styling {
margin: 10px;
border: 1px solid #000;
padding: 5px;
}
</style>

Câu trả lời hay nhất

hi,

Like every other component in Odoo, when interacting with the DOM, it already supports Bootstrap v4, so you can add classes to it. Here is an example of using padding and margin (p-4, m-5). However, if you want it to be centered, you can use classes like d-flex, justify-content-center, align-items-center. You can add any class you need, the only thing to do is to be proficient in Bootstrap then you will be fine.

Regards

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hi,

You can right click on the element and inspect to find its class and add css to that class as per your requirement in a .css file and add that to your custom module.

eg: 

.class_name {
padding: 100px;
}

Regards

Ảnh đại diện
Huỷ bỏ