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 6583847
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T16:27:45+00:00 2026-05-25T16:27:45+00:00

You can play with my code here: http://jsfiddle.net/gqQnd/ Basically I want to have a

  • 0

You can play with my code here:
http://jsfiddle.net/gqQnd/

Basically I want to have a div of content to have a semi-transparent border.
The border is semi-transparent but the insider div also become semi-transparent.
I want the inner div to be white BG

Anyone has suggestion?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <style type="text/css">
        #transparency {filter: alpha(opacity=75);opacity:.75; -moz-opacity:.75; background-color:#ccc;border:5px solid #333; position:absolute;top:50px; left:50px;}
        #cont {background-color:#fff;filter: alpha(opacity=100);opacity:1;}
    </style>
</head>
<body>
 This is so cool way to do this
 <br />
 This is so cool way to do this
 <br />
 This is so cool way to do this<br />
 This is so cool way to do this<br />
 This is so cool way to do this<br />
 This is so cool way to do this<br />
 This is so cool way to do this<br />
 This is so cool way to do this<br />
 This is so cool way to do this<br />
 This is so cool way to do this
    <div id="transparency">
        <div id="cont">
            <div>
                This is header
            </div>
            <div>This is body</div>
        </div>
    </div>

</body>
</html>
  • 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-25T16:27:45+00:00Added an answer on May 25, 2026 at 4:27 pm

    Your styles for #cont are actually being applied (hence the white background, even if it is semi-transparent). The problem is that opacity is inherited, and so if you apply it to a parent element, there’s no way to stop it being applied to the child elements.

    You could use an rgba value for the border-color, but then you get dark corners in Chrome and Safari (I think), where the borders overlap. Read about it here (with workarounds).

    What about just setting an rgba background on the parent, with some padding?

    http://jsfiddle.net/Kp7JJ/

    Update: see css3please.com for cross browser support for rgba, e.g. you will need to apply a Microsoft filter in the CSS to get it to work in IE

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

Sidebar

Related Questions

I have an MP3 audio file that I want to play from my Android
I'm using the WindowsMedia library found here: http://www.ernzo.com/soundstudio.aspx The sample code had the ability
Can anyone shed any light on why I'm unable to click and play a
Here is the site http://www.2playermode.com/ You notice the login button. it has the nice
Hi i need to play mp3 file from google's texttospeech api at here .But
I've created a program (C#) to play an audio/video file using DirectX library. Here's
UPDATE : I got my O3D situation straightened out, but I have yet to
I am trying to play with making my app look better and I found
I'm having a conundrum here, and I'm not even sure it's possible. I'm developing
I have a Json object that I'm dumping into a jQuery template (tmpl). It

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.