473,398 Members | 2,393 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Opacity Question

I have a div in which I have given opacity so that the background shows through. This works fine, except that the background also shows through the pictures. Is there a way to make it so that the pictures are not given this opacity?

Here is the webpage. http://seniordesign.ee.nd.edu/2007/Design%20Teams/Lightning%20Riders/team.html

Thanks!!
Mar 29 '08 #1
6 1048
drhowarddrfine
7,435 Expert 4TB
The problem is that the setting on the parent is inherited by everything else.
Mar 29 '08 #2
The problem is that the setting on the parent is inherited by everything else.
Is there a way to stop the inheritance?
Mar 29 '08 #3
drhowarddrfine
7,435 Expert 4TB
Please do not double post.

Somehow I cut off my own post above. You can't turn inheritance off so you'll have to move those images outside of the transparent divs. Or perhaps use positioning to slide a background behind the images.
Mar 29 '08 #4
Please do not double post.

Somehow I cut off my own post above. You can't turn inheritance off so you'll have to move those images outside of the transparent divs. Or perhaps use positioning to slide a background behind the images.
Absolute positioning is out of the question, because I have my page centered, so the position of everything depends on the size of the viewer's browser window.

You mentioned moving images outside of the transparent divs; how can I do this while still keeping the pictures in their respective locations on the page?
Mar 30 '08 #5
drhowarddrfine
7,435 Expert 4TB
Opacity is actually post-processed, meaning all this blending is done after the elements are already placed, so the only way to fix this is to remove those images from that div. Of course, that requires some thought.

My idea of using positioning does not necessarily mean absolute positioning, though it might. If the containing element is relative, then the abs pos element will remain within that container.

Another thought is what would happen if the image was z-index'ed so it's at a different level compared to the background.

I'm just throwing out ideas without thinking them through.
Mar 30 '08 #6
Opacity is actually post-processed, meaning all this blending is done after the elements are already placed, so the only way to fix this is to remove those images from that div. Of course, that requires some thought.

My idea of using positioning does not necessarily mean absolute positioning, though it might. If the containing element is relative, then the abs pos element will remain within that container.

Another thought is what would happen if the image was z-index'ed so it's at a different level compared to the background.

I'm just throwing out ideas without thinking them through.
I appreciate your feedback. Thanks for your ideas.

I fooled around with the z-index; I can get the images to no longer have the transparency, but then the images are stuck between the background and the div in which I wanted them to appear; in other words, I was unable to modify the z index effectively without making the image disappear behind the parent div.

I also attempted to move the images out of the parent div, and use positioning, but I had the same problem described above (when modifying the z-index).
Mar 31 '08 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Dean Edwards | last post by:
I am attempting to change the opacity of an image. I can modify opacity ok: function flip(pic, opacity){ pic.style.filter = 'alpha(opacity='+opacity+')'; } But I'm not familiar with...
3
by: Marek Mänd | last post by:
This posting will express my concern about the future of css3 forthcoming recommendation. I think for long time now, that the current implementation of CSS attribute opacity is less than usable...
1
by: chris | last post by:
I've used JavaScript DOM scripting to create a table element and alter its opacity. Bizarrely, the contents of the table appear to vanish when the opacity changes. One important note is that I...
1
by: mhoeneveld | last post by:
I am writing a small script to fade the opacity of an image/object. The script itself works fine only I do have some unwanted behaviour. I do use a tablecell object and the mouseover/mouseout to...
2
by: reidarT | last post by:
I want a windows form to act like the one in Outlook when you get a new message and it is visible for about a couple of seconds and then the opacity decreases and the form dissapears in the end I...
16
by: Darko | last post by:
Hi, I'm trying to get and set an element's opacity, but I'm stuck with, what a hell of surprise, Internet Explorer. As for getting the element's opacity, I have the following (not working) lines...
15
by: Sunny | last post by:
Hi, I can change the lement opacity in IE using. abc.style.filter = 'alpha(opacity=' + 10 + ')'; But this dont work in firefox, In firefox it throws error. How I can change the opacity of an...
5
by: altonator | last post by:
Hello fellow coders. I have a little problem with a script that changes the opacity and z-index of two elements. It's basically 2 elements on top of each other and when you click a link it fades...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.