Min Max Width

Dear Sciaku Learner you are not logged in or not enrolled in this course.

Please Click on login or enroll now button.

If you have any query feel free to chat us!

Happy Coding! Happy Learning!

Lecture 55:- Min Max Width

min-width and max-width are CSS properties that specify the minimum and maximum width of an element, respectively.

min-width sets the minimum width that an element can be. If the content of the element is wider than the specified min-width, it will be displayed at its natural size. If the content is narrower, the element will be stretched to the specified min-width.

max-width sets the maximum width that an element can be. If the content of the element is wider than the specified max-width, it will be scaled down to fit within the specified max-width. If the content is narrower, it will be displayed at its natural size.

Here's an example:

cssCopy code

div {  min-width: 300px;  max-width: 700px;  height: 200px;  padding: 20px;  border: 10px solid black;  margin: 30px; }

In this example, the div element will have a minimum width of 300px and a maximum width of 700px. If the content is wider than 700px, it will be scaled down to fit within 700px. If the content is narrower than 300px, the div element will be stretched to 300px.

6. Styling With CSS

2 Comments

@niteshguptav63
niteshguptav63 Nov 17, 2024 at 1:39 PM

I am not able to access videos from second class and further. I have already completed first class

@niteshguptav63
niteshguptav63 Nov 16, 2024 at 10:56 AM

When will I get my course?

@admin79
admin79 Nov 17, 2024 at 1:29 PM

Now, Your query was resolved.

Frequently Asked Questions About Sciaku Courses & Services

Quick answers to common questions about our courses, quizzes, and learning platform

Didn't find what you're looking for?

help_center Contact Support