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

-1

Hello everyone, I would like to know how I can expand the image from above until it reaches all this white part without leaving the left part blank and tmb would like to know how to decrease the height of the image below. >     

asked by anonymous 24.02.2018 / 21:38

1 answer

0

Properties width and height

To adjust widths and heights, you can use the CSS width and height properties. What's more, you can choose the value and drive 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'm going to use the following classes: img-ball and img-button-scrotum . So just follow the steps:

  • Place the class img-ball in the first tag;
  • Put class img-button-scrotum , in the second tag;
  • Create a CSS rule for img-ball , using width: 100%; ;
  • Create a CSS rule for. img-button-scrotum , using height: <altura desejada>; ;
  • Result

    .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 is a link for you to study about it:

    link

        
    25.02.2018 / 01:08