How do its | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
0

How do its

How do I make an image fit in the navbar, without modifying the position of another element

23rd Mar 2021, 3:46 PM
Andres Gómez
Andres Gómez - avatar
1 ответ
0
Set width or height of the image manually by the "width" or "height" attribute of the <img> tag or the same properties of the "style" attribute of the <img> tag. Example: <img src = "https://example.com/navbar_img_1.png" height = "100px" /> Warning: if you set both width and height manually, use the original proportions, otherwise it will look prolate. But it is still recommended to use both attributes, otherwise the page will fluctuate during loading.
23rd Mar 2021, 4:42 PM
#0009e7 [get]
#0009e7 [get] - avatar