Jump to content

Need help with transparency / img tag


abragj

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.

Link to comment
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
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...