• Hi to anyone out there that may hold a solution to my frustrating problem

    I am using the Shopify theme which has a slider eith a text box that lays over the image. I am trying to make the background of the text only 50% opacity but when I add the script in the style.css file it makes the text transparent as well.Please can anyone tell me how I can overcome this? I will be so grateful. Thanks in advance!
    -Larissa

    Here is the code.

    /* Slide Caption */
    .caption {
    text-transform: uppercase;
    font-weight: bold;
    color: #fff;
    background: #000;
    line-height: 130%;
    position: absolute;
    z-index: 10;
    padding: 10px;
    max-width: 90%;
    max-height: 50%;
    overflow: hidden;

    This is what it looks like with the opacity filter

    /* Slide Caption */
    .caption {
    text-transform: uppercase;
    font-weight: bold;
    color: #fff;
    background: #000;
    -ms-filter: “progid: DXImageTransform.Microsoft.Alpha(Opacity=50)”;
    filter:alpha(opacity=50);
    opacity: 0.5;
    line-height: 130%;
    position: absolute;
    z-index: 10;
    padding: 10px;
    max-width: 90%;
    max-height: 50%;
    overflow: hidden;

Viewing 4 replies - 1 through 4 (of 4 total)
  • CSS for font color is:

    body: {color: #fff};

    *text color

    Your code only has the text property and does not include the selector, which is body in this case.

    Thread Starter temptatchic

    (@temptatchic)

    doesn’t this refer to the background color though?
    background: #000

    trying to make the background of the text only 50% opacity

    Do not apply opacity to the element. Instead, use rgba to background, or use transparent png (with color and opacity) as background image.

    I would use rgba and do nothing for IE8 (it’s ok to let IE8 display solid color because it’s not anything crucial, just styling).

    background: rgba(0, 0, 0, 0.5);

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Make text holder background transparent’ is closed to new replies.