If you have any query feel free to chat us!
Happy Coding! Happy Learning!
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
.
Comments: 2
I am not able to access videos from second class and further. I have already completed first class
When will I get my course?
Now, Your query was resolved.