scale an image css
<!DOCTYPE html>
<html>
<head>
<title>cell padding</title>
<style>
.gfg {
width:auto;
text-align:center;
padding:20px;
}
img {
width: 100%;
height: 100%;
object-fit: contain;
}
</style>
</head>
<body>
<div class = "gfg">
<p id="my-image"><img src=
"https://media.geeksforgeeks.org/wp-content/uploads/geeksforgeeks-17.png">
</p>
</div>
</body>
</html>
Also in CSS:
- html dim entire screen
- comment css
- css opacity transition
- linear gradient css
- HOW TO REDUCE BACKGROUND IMAGE SIZE IN CSS
- how to create polaroid effect in css
- textarea only one line
- textarea placeholder
- css dropdown
- style file input button css
- font awesome cdn
- flexbox css
- putting label on top of input css
- media queries css not working for mobile
- css background image responsive
- how do you center buttons in css
- tint image with background color css
- css selected color
- css align center vertical and horizontal
- css text outline
- asp.net set css class in code behind
- summation in jupyter markdown
- internal css
- ancho maximo css