Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
3 Odpovědi
3529 Zobrazení

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?

Avatar
Zrušit
Nejlepší odpověď

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

Avatar
Zrušit

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>

Nejlepší odpověď

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

Avatar
Zrušit
Nejlepší odpověď

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

Avatar
Zrušit