margin: 20px(top/bottom) 10px(left/right);
margin: 10px(top) 5px(right) 15px(bottom) 30px(left);
img{
max-width: 500px;
max-height: 600px;
}
img{
max-width: 80%;
max-height: 60vh;
}
Video Summary
All right, in this lesson we’re going to talk about height and width, and how we can manipulate the size of our elements. Basically the width is how wide you want an element to be and the height is how tall you want the element to be. It’s a pretty straightforward property and value set. The only thing I do want stipulate is is that height. You can only use pixels or view heights as a unit. of measurement. But with you can use pixels percentages and view best if that’s what you want to use. More times than not you’re going to use pixels and percentages when it comes to less. But if you need to use view with that as an option for you now before we hop into code pen and we start playing around with this, I do want to also say that there is a max width and a max height, property value as well. And the reason why you might want to use this is let’s say if you have an image and the image resolution is only 500 by 500 pixels wide by 500 pixels tall. So maybe you want to say I don’t want this image to grow any larger than this exact measurement, because if it does, it will get distorted and it won’t look it won’t look the same. All right. So with that being said, I don’t think we need to over explain this. this just happened to code pen and start playing around with this property value set.