+ 1
How to give a img a height-size and weight-size?
using css how can i gv my image a height and weight
4 Réponses
+ 2
Just use 'height' and 'width' propery with image class
i.e. .img{ width:40px; height:50px;}
+ 2
As mainish said but use a your img id if the style is for a specific image.
so the code is:
html file:
...
<img id="myImg" src"..." alt="...">
...
css file:
#myImg{ width:40px; height:50px;}
0
If you would like that your images be of same size in terms of height & weight then just give a unique value to your all class attributes inside the img tags
i.e <img class="anypreffereablename" scr="img1.extension" alt="">
<img class="anypreffereablename" scr="img2.extension" alt=">
NB: anypreffereablename should be same for both img tags
Then jst use an external css link i.e:
img.anypreffereablename{ width:"specify"px; height:"specify"px;}
0
thanks to u all