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

Hello, first, please forgive me for the broken English, I am using a translator.


I'm new to development, and I'm having a problem centering my content.


I have a container that contains two divs, one with an SVG map inside and the other with text that changes depending on where you click on the map.


I want the two to be side by side, which works in my browser, but when I integrate my code into Odoo, everything goes all over the place.


Can you guide me?


(HTML, CSS, JS, Odoo16)


아바타
취소
베스트 답변

Hi Bro,
If you want both divs in the same row you can use style=" display: flex". This will default make both divs in a row. I you want to make both divs aligned in the column, then you can use, style=" display: flex; flex-direction: column".
If you want to center align row-wise then you can use, style="justify-content: center" and if you want to align column-wise, then you can use, style="align-item: center".

아바타
취소
작성자

Hi Pratyush Ratan,

First, thank you for your answer.
Unfortunately, When I apply your advice the map is at the top, but my text appears at the bottom (I have to scroll a little to find it…)

If you have time to take a look at the code on my Github to tell me where I'm wrong... (https://github.com/Matthis-LM/map-svg-odoo16/blob/main/indexx.html)

베스트 답변

Hi

If you need to make two divs side by side you can use the style= display:flex ! important; inside your container.This important is giving to makes priority for your style.You can provide this style as inline.example:<div class="container"></div>
Or you can create a directory inside your module and provide this CSSexample:.container{ display:flex !important;}
and you can specify the path  in assets inside the manifest  like
'assets': {
        'web.assets_backend': [
               module_name/static/src/css/style.css        ]}


Hope it helps

아바타
취소
관련 게시물 답글 화면 활동
1
7월 24
2127
1
7월 24
2149
1
12월 22
2887
2
3월 18
20325
1
3월 15
4196