How do I style separate img files with css? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How do I style separate img files with css?

I have my logo img in the header. Next I want a picture going across the width of my page. If I use img { and Imput my css here } nothing will be affected because I have already styled with img tag... Any advice??

25th Mar 2019, 1:04 AM
Jack Logan Kennedy
Jack Logan Kennedy - avatar
3 Answers
+ 3
The usual practise is add different class to the img tags, and style accordingly.
25th Mar 2019, 2:50 AM
Calviղ
Calviղ - avatar
+ 2
Try add this into head tag <style> img { width: 100vh; } </style>
25th Mar 2019, 1:52 AM
Calviղ
Calviղ - avatar
0
That's useful for sure, but what if I wanted two img files in the body tag of different size?
25th Mar 2019, 2:37 AM
Jack Logan Kennedy
Jack Logan Kennedy - avatar