I want when you click the button text to appear

I want when you click the button text to appear so I can make the divs the same height and size before the button is clicked https://codepen.io/Boeroe/pen/OJdXwBv
Boeroe
CodePen
OJdXwBv
...
3 Replies
missymae
missymae14mo ago
Learn about conditional rendering. Use the button to set a state, and where you have the element you want to show, use a truthy or falsey state to render. <Button onclick(setRenderText(prev => !prev)> ... {renderText && <ExtraText/>}
VinceAggrippino
VinceAggrippino14mo ago
It's not hard to make a paragraph's height automatically expand when you click a button, but your DIVs will be the same height regardless of the text size because you set height: 100% on the .services-box selector. They're the height of the grid row, which is determined by the height of the tallest element in the row. That's why there's so much space in the first box between the bottom of your "button" and the bottom orange border of the element.
Boeroe
BoeroeOP14mo ago
I wil try to make it happen with JS Yes correct, i will play a bit with the settings and add some JS
Want results from more Discord servers?
Add your server