Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6532901
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T10:03:37+00:00 2026-05-25T10:03:37+00:00

I am attempting to have an opacity effect on my div which has a

  • 0

I am attempting to have an opacity effect on my div which has a background-image applied, and still keep the text “un-opacified”.
My markup:

<div id="projects" class="feature">
    Projects
</div>

My CSS:

.feature {
    display: inline-block;
    margin: 30px;
    cursor: pointer;
    width: 300px;
    height: 300px;
    -webkit-border-radius: 150px;
    -moz-border-radius: 150px;
    border-radius: 150px;
    font-family: 'Droid Sans', Helvetica Neue, sans-serif;
    font-size: 2em;
    color: #fff;
    text-align: center;
    line-height: 1.2em;
}

.feature:after {
    /* Fallback for web browsers that don't support RGBa */
    background-color: rgb(0, 0, 0);
    /* RGBa with 0.6 opacity */
    background-color: rgba(0, 0, 0, 0.8);
    /* For IE 8*/
    -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000)";
}

.feature#projects {
    background-image: url('img/hero.png');
}

I thought of using pseudo elements, but to no avail!

Any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T10:03:37+00:00Added an answer on May 25, 2026 at 10:03 am

    I might use a semi-transparent png for the background image, then style the text accordingly.

    You might also want to look into RGBa:

    http://robertnyman.com/2010/01/11/css-background-transparency-without-affecting-child-elements-through-rgba-and-filters/

    This applies to background-color, although it may also work on your image (untested, though)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an editor I am attempting to emulate that has some very nice
I'm attempting to have a derived class (normal template) that has a variable of
I am attempting to have Tomcat, which is currently running as a service on
I have an .xml file which has an accompanying .xsl file. The output of
I am attempting to have the user take a picture of something containing text
I am attempting to have one div hovering over another div full of content.
I have been attempting to have a object that I can use across multiple
I am attempting to have a ReportHandler service to handle report creation. Reports can
I am attempting to have mechanize select a form from a page, but the
Basically I am attempting to have an AI agent navigate a world based on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.