+ 2

HTML / CSS: is there way to expand(scale) only height?

When I add a height to an element, it adds height to the bottom. But I want it to add height to both sides (top and bottom). If I use transform:scale(), it expands both width and height. ❗️Is there a way to expand / scale only height?❓ (------|---- (✔️)) (_ _ _ _ _ _ _ _ (❌)) | This code for example, it adds height to the bottom only: https://code.sololearn.com/WL2hb2yW1J24/?ref=app

24th Jun 2019, 11:00 PM
Ginfio
Ginfio - avatar
3 Réponses
+ 2
Add values to your transform: scale () transform: scale(1,2); Awesome Code!
24th Jun 2019, 11:28 PM
Chris Coder
Chris Coder - avatar
+ 2
Use align-content:center in your main div (parent div in which you added "display:flex;")
5th Jul 2019, 8:39 AM
Praveen Kumar Premaram Prajapati
Praveen Kumar Premaram Prajapati - avatar
+ 2
https://code.sololearn.com/W0B94zYa9sq7/?ref=app I have updated your code. Hope you don't mind.
5th Jul 2019, 8:40 AM
Praveen Kumar Premaram Prajapati
Praveen Kumar Premaram Prajapati - avatar