css break column before element without breaking the wrapper

css break column before element without breaking the wrapper  #angularjs #reactjs

  • To further elaborate, applying break rules to individual elements means that they alone will break if you want 2 elements to stick together you need to use a parent element.
  • Gummi bears chocolate cake bonbon caramels.
  • Jelly wafer wafer bear claw candy canes marzipan macaroon bear claw.
  • Bear claw macaroon jelly beans.
  • Biscuit lollipop lollipop chupa chups gummi bears sweet jujubes.

If it does not work that way with columns, I will accept other solutions, but I hope to not need to use javascript in this case.

@ng_real_ninja: css break column before element without breaking the wrapper #angularjs #reactjs

My desired result, always break before a specific element, h2 in this case:

html

css

If it does not work that way with columns, I will accept other solutions, but I hope to not need to use javascript in this case.

I also hope there is a way without the need to add additional html elements.

You can solve this by wrapping the heading and paragraph in whatever container you wish. And then applying the following to the container element:

To further elaborate, applying break rules to individual elements means that they alone will break accordingly, however if you want 2 elements to stick together you need to use a parent element.

css break column before element without breaking the wrapper

You might also like More from author

Comments are closed, but trackbacks and pingbacks are open.