My img tag does not respond to my css settings

-1

I was trying to learn HTML, until my image did not respond with my CSS:

img#imagens1{
    height: 19.92;
    width: 19.92; 
}

The image was responding up to five minutes ago:

<img src="IconTwiter.png"id="imagens1">

Does anyone know how to solve this?

    
asked by anonymous 25.09.2018 / 01:11

2 answers

1

When you want to pass a size in CSS you need to indicate in which measure you want to use, as the friend said in the answer from above, we have the measure "px" which means pixel. We can use others like "cm", "mm", "pt" etc ... some responsive (change size according to screen size) like "%" and "fr".

As you are learning, try using each one and see how they behave on your page.

Ex:

#imagens1{
    height: 10%;
    width: 10%; 
}
    
01.10.2018 / 23:02
0

I do not think it's just a lack of measurement, try putting it that way

#imagens1{
    height: 19.92px;
    width: 19.92px; 
}
    
25.09.2018 / 18:43