Background Opacity

Hi. I am using version 4.2 of CS Cart, and I am trying to have opacity in the background, but it works for all content, no only for background. Is there anyway to have only in bg opacity? Thanks.



I am using this code:


.tygh-content {
background:#fff;
opacity:0.8;
}

dasdasdas.jpg

Dear CR88,



There are several methods to do it.

  1. The most easiest variant is to design it in Photoshop.
  2. [color=#262626][font=arial, sans-serif][size=3]There is no CSS property background-opacity, but you can fake it by inserting a pseudo element with regular opacity the exact size of the element behind it.[/size][/font][/color]





    [color=#262626][font=arial, sans-serif][size=3]
    body{ width: 100%; height: 100%; display: block; position: relative; } body::after { content: ""; background: url(image.jpg); opacity: 0.5; top: 0; left: 0; bottom: 0; right: 0; position: absolute; z-index: -1; }
    [/size][/font][/color]



    But we can not garantee that the second method will work correctly.



    Best regards, Alt-team.