CSS Dimension
-- Learning is not just about technology, but also about dreams!
- Home
- HTML
- JavaScript
- CSS
- Vue
- React
- Python3
- Java
- C
- C++
- C#
- AI
- Go
- SQL
- Linux
- VS Code
- Bootstrap
- Git
- Local Bookmarks
CSS Tutorial
CSS Tutorial CSS Introduction CSS Editor CSS Syntax CSS Id and Class Selectors CSS Creation CSS Backgrounds CSS Text CSS Fonts CSS Link CSS List CSS Table CSS Box Model CSS Border CSS Outline Property CSS Margin CSS Padding CSS Grouping and Nesting CSS Dimension CSS Display and Visibility CSS Positioning CSS Overflow CSS Float CSS Layout β Horizontal & Vertical Alignment CSS Combinators CSS Pseudo-classes CSS Pseudo-elements CSS Navbar CSS Dropdowns CSS Tooltip CSS Image Gallery CSS Image Transparency CSS Image Sprites CSS Media Types CSS Attribute Selectors CSS Form CSS Counters CSS Website Layout CSS !important CSS Summary CSS Examples CSS Quiz
CSS3 Tutorial
CSS3 Tutorial CSS3 Introduction CSS3 Borders CSS3 Border Radius CSS3 Backgrounds CSS3 Gradients CSS3 Text Effects CSS3 Fonts CSS3 2D Transforms CSS3 3D Transforms CSS3 Transitions CSS3 Animations CSS3 Multiple Columns CSS3 User Interface CSS Images CSS Buttons CSS Pagination Examples CSS3 Box Sizing CSS3 Flexbox CSS3 Media Queries CSS3 Media Queries Examples CSS3 Quiz
CSS Responsive Design
Viewport Grid View Media Queries Images Videos Frameworks
CSS Reference Manual
CSS Reference Manual CSS Selectors CSS Aural Reference CSS Web Safe Fonts CSS Animatable CSS Units CSS Colors CSS Color Values CSS Color Names CSS Hex Colors
Previous: CSS Grouping and Nesting CSS Grouping and Nesting
Next: CSS Display and Visibility CSS Display and Visibility
Explore Further
- Software
- Programming Languages
- Scripting Languages
- Network Design and Development
- Scripting
- Web Service
- Network Services
- Computer Science
- Programming
- Development Tools
CSS Dimension
CSS Dimension properties allow you to control the height and width of elements. Similarly, they allow you to increase line spacing.
More Examples
This example demonstrates how to set the height of different elements.
Set the height of an image using percentage
This example demonstrates how to set the height of an element using percentage values.
Set the width of an element using pixel values
This example demonstrates how to set the width of an element using pixel values.
Set the maximum height of an element
This example demonstrates how to set the maximum height of an element.
Set the maximum width of an element using percentage
This example demonstrates how to set the maximum width of an element using percentage values.
Set the minimum height of an element
This example demonstrates how to set the minimum height of an element.
Set the minimum width of an element using pixel values
This example demonstrates how to set the minimum width of an element using pixel values.
All CSS Dimension Properties
| Property | Description |
|---|---|
| height | Sets the height of an element. |
| line-height | Sets the line height. |
| max-height | Sets the maximum height of an element. |
| max-width | Sets the maximum width of an element. |
| min-height | Sets the minimum height of an element. |
| min-width | Sets the minimum width of an element. |
| width | Sets the width of an element. |
YouTip