how to expand or decrease the height of an image in html and css

Asked

Viewed 2,718 times

-1

inserir a descrição da imagem aqui

Hello good afternoon everyone,I would like to know how I expand the image from the top until it reaches all that white part without leaving the left part blank and tmb would like to know how to decrease the height of the image below.

  • Friend without the code is difficult to answer you. Try to put width: 100% in the images or post the code to give you an accurate answer

1 answer

0

Properties width and height

To adjust widths and heights, you can use the CSS properties width and height. What’s more, you can choose the value and unit you want. (px, cm, in, % and etc)

Example

width: 100px;
height: 100px;

Your case

You have not shared your HTML or CSS code. So I will use the following classes: .img-ball and .img-boot-scrotum. So just follow the steps:

  1. Classify .img-ball, at first tag ;
  2. Classify .img-boot-scrotum, on the second tag ;
  3. Create a CSS rule for .img-ball, using width: 100%;;
  4. Create a CSS rule for .img-boot-scrotum, using height: <altura desejada>;;

Upshot

.img-bola {
  width: 100%;
}

.img-botao-escroto {
  height: <escolha a altura>:
}
<img src="https://i.imgur.com/KoyP4pY.jpg" class="img-bola">
<img src="https://i.imgur.com/9q7DJjq.jpg" class="img-botao-escroto">

Here’s a link for you to study on the subject:

http://www.htmlprogressivo.net/2014/04/Propriedades-width-height-Como-Definir-Altura-Largura-em-CSS-Tutorial.html

Browser other questions tagged

You are not signed in. Login or sign up in order to post.