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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T01:10:08+00:00 2026-06-07T01:10:08+00:00

If I have: #em { opacity:0.5; } How do I get #em ‘s opacity

  • 0

If I have:

#em {
  opacity:0.5;
}

How do I get #em‘s opacity using javascript? 😀

I’ve got troubles with the following (it returns nothing):

return document.getElementById("em").style.opacity;
  • 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-06-07T01:10:11+00:00Added an answer on June 7, 2026 at 1:10 am

    Setting a CSS value in a stylesheet is not the same as setting it through the style property. You need to look at the getComputedStyle method to obtain this (and also currentStyle for older IE).

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

Sidebar

Related Questions

Suppose I have a javascript object like this: window.config config.UI = { opacity: {
I have something like this: <style> #submenu { background-color: #eee; height:200px; width:400px; opacity: 1;
I have the following animations in my web page: $(.anim-item).not(this).animate({ opacity: 0, }, {
I have a style for a ListViewItem control: <EventTrigger RoutedEvent=ListViewItem.MouseEnter> <BeginStoryboard> <Storyboard> <DoubleAnimation Storyboard.TargetProperty=BitmapEffect.Opacity
I have the following code: $(#myDiv).hover( function () { $(this).clearQueue().animate({ backgroundColor: #d7df23, opacity: 0.95
I have a CAGradientLayer I'm using as a shadow. It fades from 60% opacity
I'm trying to get the div.transbox table to not have the opacity from div.transbox.
Hi I have been trying to get this script http://jsbin.com/ipajo5/ working but using .live()
I have the following template that I am trying to get working, I have
Following up on this question , I have another issue - how to get

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.