Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Why can't I target my footer image with CSS

.footer_image {
    height: 60rem;
}
<footer>
  <div class="footer_image">
    <img src="logo_footer.png" style="margin-left:20px">
  </div>
</footer>

I cant seem to target the properties to change my image in my footer, what am I doing wrong?

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

You can use

.footer_image img {
}

This will work on all pictures which have the html img tag and are inside the .footer_image class

Or you can assign a class or id to your image to define its properties

<img class="mysuperfancyimage" src="logo_footer.png" style="margin-left:20px">
<img id="mysuperfancyimage" src="logo_footer.png" style="margin-left:20px">

You can call classes with a dot and and IDs with a Rhombus

.mysuperfancyimage {
}
#mysuperfancyimage {
}
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading