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

  • SEARCH
  • Home
  • 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 7419435
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T08:04:12+00:00 2026-05-29T08:04:12+00:00

Say, we have: <div class=outer> <div class=inner> <span class=text>Hello!</span> </div> </div> The ‘outer’ div

  • 0

Say, we have:

<div class="outer">
    <div class="inner">
        <span class="text">Hello!</span>
    </div>
</div>

The ‘outer’ div has a linear gradient background.
The ‘inner’ div has a blue background.
Is it possible to make text color the same as color of the ‘outer’ div. Sort of a text mask effect:

enter image description here

  • 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-29T08:04:13+00:00Added an answer on May 29, 2026 at 8:04 am

    You can fake it by using the text transparency KP mentioned. First, you apply the same gradient to the span as you have on the outer div. Then, you apply the blue background to the inner div and the text will look like it’s been knocked out. I have a sample fiddle here. Here’s an article that details the technique.

    Remember, this first technique will NOT work in IE. If you do want to achieve a similar effect in IE as well you can use the technique shown here. This technique requires a png, and some extra markup but it does appear to work everywhere. Since this isn’t a real text mask, you may have to play with it a bit to get it just right.

    Update: Further testing shows that Firefox doesn’t display the first technique… I would stick with the second but then it’s no longer just CSS, it does require an image.

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

Sidebar

Related Questions

Folks, Let's say that I have the following situation: <div class=outer> <div> <span> <ul>
Lets say i have the following web page: <html> <body> <div class="transform"> <span>1</span> </div>
say I have a css class name div.TestClass { float:left;etc// } span.SpanTestClass { float:right;etc//
Let's say I have some classes like: <div class=something style=display: none>Some text I would
Say you have this code: <div class=hello> <div class=cat dog/> </div> <div class=notASibling />
Say I have: <div class=outer> <div class=foo bar></div> </div> How can I check to
Say I have a loop of objects (style.cover.pic) in a DIV .style_image <div class=style_image>
Say I have jquery code like this: html += '<div class=index>' + item.index +
Lets say we have something like: <div class=row> <div class=box> <a class=more href=#more/> </div>
Let's say I have this: <div id=wrapper> <pre class=highlight> $(function(){ // hide all links

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.