ambiera logo

Ambiera Forum

Discussions, Help and Support.

folder icon Ambiera Forum > RocketCake
forum topic indicator Breakpoints and paddings
person icon
peter_g
Registered User
Quote
2025-10-20 18:11:23

Hello everyone

I have a problem with breakpoints and padding:

I have a container with a padding of 40px on each side. I now want the padding to change to 20px when the window width is less than 900px. So I thought I would write the following under Custom breakpoint CSS: padding: 20px;

But now the following happens: The padding on the left and top is now 60px (addition of 20px) and on the other sides the padding is reduced by 20px because the content is simply moved.

When looking at the HTML code, I saw that the padding is created using “margin” and a div called for example "<div id="container_49e3fcfa_padding">". With padding: 20px, I am not overwriting the existing padding, but adding to it, because there is no padding: 40px and both paddings (padding: 20px and margin: 40px) are being used at the same time.

What is the best way to solve this problem?

Thanks and best regards,
Peter

person icon
niko
Moderator
Quote
2025-10-21 08:27:59

You are right - that's something that isn't that easy to solve. But you can do it with your own code addition: In RocketCake, click View -> HTML Code of Page -> Additional CSS styles and enter:


@media only screen and (max-width: 900px)
{
container_49e3fcfa_padding { margin: 10px !important; }
}



Then it should work (won't be visible in the editor, but when clicking on Preview though)

person icon
peter_g
Registered User
Quote
2025-10-21 15:30:32

Hello

Thank you very much. At first, it didn't work. I then looked into CSS code for other breakpoints and I think you forgot the hashtag. With hashtags, it's working! emoji icon_smile

@media only screen and (max-width: 900px)
{
container_49e3fcfa_padding { margin: 10px !important; }
}


Create reply:










 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


icon_holyicon_cryicon_devilicon_lookicon_grinicon_kissicon_monkeyicon_hmpf
icon_sadicon_happyicon_smileicon_uhicon_blink   






Copyright© Ambiera e.U. all rights reserved.
Contact | Imprint | Products | Privacy Policy | Terms and Conditions |