Find us on twitterLike us on facebook
View Portfolio

PHP Library

Support Us

CSS Library

CSS Dimension Properties CSS Dimension Properties

CSS Dimension PropertiesThe CSS height and CSS width properties allow you to set the height and width of an element. These properties can hold following values: length: The height and width of any div or html parts that hold content can be added to images and videos as well. Devsocial.net offers free online tutorials, references and free SEO Tools the world wide web design library.

info Table of Contents:

Properties Description
height The height property sets the height of the HTML element.
width The width property sets the width of the HTML element.
line-height The line-height property sets the height of a line of a text.
max-height The max-height property sets the maximum height that an element can be.
min-height The min-height property sets the minimum height that an element can be.
max-width The max-width property sets the maximum width of an element.
min-width The min-width property sets the minimum width of an element.

CSS Height and Width Values

The CSS height and width property consist of the following values:

Value Description
auto This is the default value of both properties.
length The user can set the height and width of the box in px, cm, etc.
% The user can set the value of the height and width in % according to their containing block
initial This value sets the value of the height and width to its default value.
inherit This value inherits the value of height and width property from its parent element.

Max-Width of a box in CSS

The max-width property is used to set the max-width of any element. The values of this property can be specified in length, cm, px, %, etc. This property is used to overcome the problem that occurs when the user resizes the screen which is smaller than the element's height and width then the browser adds the side scroll bar to the web page. So, this property improves the handling of the elements when the user switches to the smaller window.

Conclusion

In this lesson we have learned about the various values of the CSS height and width property. Also we have learned how to set max-height and max-width of an HTML elements.

Rating:

Capable: broswers

Date Posted: 2/5/2023

info Note: Make sure your page contains a valid doctype for this menu to render properly.

info Revision History: Nov 8th, 2023': updated code..

info Usage Terms: | Please Read - -> >

Viewed: 60,140

info Share our library with others. Spread the love. Share: share on facebook

Was this article & Examples Helpful ?
If so you can help us bring this and more to become available for you at anytime. You can help us by donating any amount or Sharing & Following Us. Donate through PayPal.

info More useful links:

Buy Ready made Web Apps  Buy Ready made Web Apps


Website Ranking Tools

classifieds24.net classifieds24.info classifieds24.org nywds.com https://www.globalclassifieds.org/ domainpaid.net devsocial.net paystopost.com paystopost.org https://www.101now.com https://www.newyorkconstructionco.com paystopost.org https://www.hirepros.org https://www.hirepros.info
EST: 2012 | © 2025 Devsocial.net | All Rights Reserved. [ + ][ y ]
SHARE:

Facebook

Twitter