Empty div with 1px height?

Hi!
I want to create a line out of a div with a height of 1px. When I set the div to 1px height the div stays at 90px height in the editor. Only on the front end the div has a 1px height. How can I make sure the div has a height of 1px in the editor as well?

Hey Jonas,

Bricks sets a min-width and min-height on empty “container elements” in the builder to make it easier to work with them. So you could either use a min-height (instead of height) of 1px or explicitly disable the builder behaviour with some custom CSS on the element:

%root%:empty {
    min-height: unset;

    /* Also disable the min-width if needed */
    /* min-width: unset; */
}

Best,

André

1 Like

Hey @aslotta,

thanks a lot for your suggestion! I assumed accessibility was the reason but I think it should be disabled as soon as for example a specific height is set. I mean we can select every element in the navigator.

But the min-height solution works fine. Thanks a lot! :slight_smile: