Course Content

  • lecture-21-height
  • lecture-21-width

Course Content

FAQs

  • Height: The height property sets the vertical length of a box. Height is measured in pixels and should not be confused with the measure word “height”.
  • Width: The width property sets the horizontal length of a box. Width is measured in pixels and should not be confused with the measure word “width”.

There are many properties in CSS, but these 5 are the most commonly used:

  • background-color
  • border-top-width
  • border-top-style
  • border-right-width
  • border-right-style

When you give an element a width of 100% in CSS, you're essentially saying, "Make this element's content area precisely equal to its parent's explicit width — but only if its parent has an explicit width." So, if your parent container is 400px wide, a child element with a width of 100% will be 400px wide as well.

The max-width CSS attribute specifies an element's maximum width. It prevents the width property's utilised value from exceeding the value given by max-width.

Recommended Courses

Share With Friend

Have a friend to whom you would want to share this course?

Download LearnVern App

App Preview Image
App QR Code Image
Code Scan or Download the app
Google Play Store
Apple App Store
598K+ Downloads
App Download Section Circle 1
4.57 Avg. Ratings
App Download Section Circle 2
15K+ Reviews
App Download Section Circle 3
  • Learn anywhere on the go
  • Get regular updates about your enrolled or new courses
  • Share content with your friends
  • Evaluate your progress through practice tests
  • No internet connection needed
  • Enroll for the webinar and join at the time of the webinar from anywhere