Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Help with Positioning Reply To: Help with Positioning

#238264
Paulie_D
Member

Setting opacity on an element affects the opacity of everything inside that element.

If you want a a semi-transparent backgrouund use a background property color that supports alpha (transparency) values.

These are usually rgba or hsla (the ‘a’ stands for alpha).

#title_back {
  background-color: rgba(0,0,0,0.5);
}

Then you can just add your image…and since images are inline you can center then by adding text-align:center.

http://codepen.io/Paulie-D/pen/mVZLQv

Hoever, I’m getting the feeling that this is not what you are really after but rather you are trying to put text on top of the image.

We really need to see what your desired result would look like.