- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Change the width of element using CSS
Use the scaleX() method to change the width of an element with CSS.
Let us see the syntax −
scaleX(n);
Here, n is a number representing the scaling factor.
Let us see an example
div { width: 40px; height: 50px; background-color: black; } .myScaled { transform: scaleX(0.9); background-color: orange; }
- Related Articles
- Change the width and height of element using CSS
- Change the height of element using CSS
- Set min-width and max-width of an element using CSS
- Change the width of the bottom border with CSS
- Change column-width property with CSS Animations
- Change column-rule-width property with CSS Animations
- Set the width of the left border using CSS
- How to get the width of an element using jQuery?
- How to get the width of a div element using jQuery?
- How to change the cursor width in IText using FabricJS?
- Set the height and width of an image using percent with CSS
- Set the width of the outline with CSS
- CSS width property
- Set the width of the element in HTML
- How to set width and height of an element using jQuery?

Advertisements