The css has crashed in tablet

Posted in: Newspaper
Post count: 51

Hello,

I have a problem with the tablet view: https://snag.gy/bgclYU.jpg

I tried to use css media query and add margin to the divs:

@media
only screen and (min-width:321px) and (max-width:768px){#td_uid_3_5a78f16f1d965 > div:nth-child(1) > div:nth-child(2) > div {margin-top:130px!important;}}

@media
only screen and (min-width:321px) and (max-width:768px){#td_uid_3_5a79a248703a1 > div:nth-child(1) > div:nth-child(2) > div {margin-top:130px!important;}}

@media
only screen and (min-width:321px) and (max-width:768px){#td_uid_3_5a79a248703a1 > div:nth-child(2) > div:nth-child(2) > div{margin-top:150px!important;}}

@media
only screen and (min-width:321px) and (max-width:768px){#td_uid_3_5a79a248703a1 > div:nth-child(3) > div:nth-child(2) > div > h3{margin-top:140px!important;}}

@media
only screen and (min-width:321px) and (max-width:768px){#td_uid_4_5a79a24877d7a > div:nth-child(1) > div:nth-child(2) > div > h3{margin-top:170px!important;}}

@media
only screen and (min-width:321px) and (max-width:768px){#td_uid_4_5a79a24877d7a > div:nth-child(2) > div:nth-child(2) > div > h3{margin-top:170px!important;}}

@media
only screen and (min-width:321px) and (max-width:768px){#td_uid_4_5a79a24877d7a > div:nth-child(2) > div:nth-child(2) > div > h3{margin-top:170px!important;}}

@media
only screen and (min-width:321px) and (max-width:768px){#td_uid_4_5a79a24877d7a > div:nth-child(3) > div:nth-child(2) > div > h3{margin-top:170px!important;}}

It worked the first time, but after i saved the custom css, it crashed again.

Could you please help me?
Site: https://rendeljkinait.hu
Thanks

Post count: 20688

Hi,

Adding margins or padding to the elements on the page may break the layout and design. The theme modules and blocks are predefined with fixed values, adding margins to them will most likely damage them.

You could review the codes and see why that is happening and avoid it, also you can use the Advanced CSS sections in the theme panel. Create code based on device if necessary using those sections
https://www.screencast.com/t/CUJHQNahnXX2

Use the browser inspector to identify the elements on the page and experiment further
https://forum.tagdiv.com/create-custom-code-using-the-browsers-inspector/

Thanks

Viewing 2 posts - 1 through 2 (of 2 total)
The forum ‘Newspaper’ is closed to new topics and replies.