How to make an element smaller or bigger with CSS

Sometimes you might have the need, especially when designing a page, to scale an item so it looks smaller, or bigger.

You can use the CSS zoom property to scale any HTML element.

Use a value < 1 to make an element smaller. For example, ha…


This content originally appeared on flaviocopes.com and was authored by flaviocopes.com

Sometimes you might have the need, especially when designing a page, to scale an item so it looks smaller, or bigger.

You can use the CSS zoom property to scale any HTML element.

Use a value < 1 to make an element smaller. For example, half the size with 0.5:

div {
  zoom: 0.5;
}

or use a value > 1 to make the element bigger, like in this case to scale it 2x:

div {
  zoom: 2;
}


This content originally appeared on flaviocopes.com and was authored by flaviocopes.com


Print Share Comment Cite Upload Translate Updates
APA

flaviocopes.com | Sciencx (2021-07-23T05:00:00+00:00) How to make an element smaller or bigger with CSS. Retrieved from https://www.scien.cx/2021/07/23/how-to-make-an-element-smaller-or-bigger-with-css/

MLA
" » How to make an element smaller or bigger with CSS." flaviocopes.com | Sciencx - Friday July 23, 2021, https://www.scien.cx/2021/07/23/how-to-make-an-element-smaller-or-bigger-with-css/
HARVARD
flaviocopes.com | Sciencx Friday July 23, 2021 » How to make an element smaller or bigger with CSS., viewed ,<https://www.scien.cx/2021/07/23/how-to-make-an-element-smaller-or-bigger-with-css/>
VANCOUVER
flaviocopes.com | Sciencx - » How to make an element smaller or bigger with CSS. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/07/23/how-to-make-an-element-smaller-or-bigger-with-css/
CHICAGO
" » How to make an element smaller or bigger with CSS." flaviocopes.com | Sciencx - Accessed . https://www.scien.cx/2021/07/23/how-to-make-an-element-smaller-or-bigger-with-css/
IEEE
" » How to make an element smaller or bigger with CSS." flaviocopes.com | Sciencx [Online]. Available: https://www.scien.cx/2021/07/23/how-to-make-an-element-smaller-or-bigger-with-css/. [Accessed: ]
rf:citation
» How to make an element smaller or bigger with CSS | flaviocopes.com | Sciencx | https://www.scien.cx/2021/07/23/how-to-make-an-element-smaller-or-bigger-with-css/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.