How can I make a wrapper's css not apply to it's contained elements [closed]


Tags: html,css

Problem :

I have a container div that has some opacity. I would like to keep it a container, so I can retain the automatic height. How do I retain the styles of the container, without them applying to all of the contents within it?



Solution :

With the opacity property this is not possible. If it's just a background color on the container the best solution is to use rgba() or hsla() for your color since they contain an alpha (opacity) value.


    CSS Howto..

    Bootstrap - how to make the image being scaled down to fit the window height?

    How to center inside divs in a 1140px fluid responsive framework?

    How to add row top and bottom margins to asp.net gridview?

    How To Dark Image Background in CSS on hover?

    First and Second touch of a button, how to show images at different times?

    How to add class based on which css class name is come in jquery

    How to solve placeholder CSS difference across different browsers?

    How to style a