treehouse : what would you like to learn today?
Web Design Web Development iOS Development

[Solved] Img Box Shadow (Exception Help)

  • Hey everyone, alright so not the best at CSS so need some help. I have some images on my site which i need box shadow on, which all works.

    i used

    img { box-shadow: 0.9px 0.9px 8px #000; }

    But, how would i go by making an exception

    I need my Logo to be an image but without a box-shadow.

  • If you give your logo an id/class in css and add the following to it it should do the trick for you.

    box-shadow: none;
    

    For example, if your logo's class name is logo:

    img.logo{box-shadow:none;}
    

    If you plan to be using the exception multiple times name the class something like "no-shadow" and then you can just add that class to anything that needs the box-shadow removed.

  • @Cyanoxide you're awesome man, that did it thank you !