I am currently taking a class, and we were told to use little to no in-line styling in our code. Is it possible to re-size an image in a similar way using an external CSS file?
<img src="image link" style="height: 200px; width: 200px;">
I am currently taking a class, and we were told to use little to no in-line styling in our code. Is it possible to re-size an image in a similar way using an external CSS file?
<img src="image link" style="height: 200px; width: 200px;">
This can be done in an external stylesheet like so:
img {
height:200px;
width:200px;
}
I would suggest only specifying the height or the width, when you do that, the other dimension is automatically sized proportionally. You will also want to add a class to the image so that you can make the CSS selector more specific so that it doesn't target all images on your page.