Jump to content
Sign in to follow this  
abragj

Need help with transparency / img tag

Recommended Posts

The code instructions on the W3schools sample makes ALL the images on my webpage transparent on rollover.What do I do to have this apply only to certain images.I want the image I have on the left side of a home page to stay 100% opache but I want 4 boxes that become transparent on rollover, located in the #maincontent div on my home page.

Share this post


Link to post
Share on other sites

You can target them like:

 #maincontent > img {type your code here}

This will target all images within the #maincontent div. If you want to target 4 other images except 1, then give them a class of say <img class='rollover' .....> and target them 4 images using the class. Failing that, you could put the 1 image you want to stay normal transparency into it's own container, again you could use the code at the top, because this will only target the img tags which are DIRECT CHILDREN of your #maincontent div. It's hard to say what to do without seeing some sort of code, as your post was not informative enough. Anyway, I hope this helps you. Regards, Laboratory Technician

  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...