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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T08:21:39+00:00 2026-06-03T08:21:39+00:00

Given this HTML, CSS, and JavaScript: http://jsfiddle.net/XvqYS/3/ If you run it on Google Chrome

  • 0

Given this HTML, CSS, and JavaScript: http://jsfiddle.net/XvqYS/3/

If you run it on Google Chrome it alerts

10px

Running it on IE, Safari, or FireFox alerts and empty string. Why?

I’m using IE9, Chrome 18.0.1025.168, FireFox 12.0, Safari 5.0.4

  • 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-03T08:21:40+00:00Added an answer on June 3, 2026 at 8:21 am

    Individual properties, such as margin-left have to be used.

    The basic method to read all properties is: http://jsfiddle.net/XvqYS/8/

    $(function () {
        var $main = $("#main");
        var margin = [
            $main.css('margin-top'),
            $main.css('margin-right'),
            $main.css('margin-bottom'),
            $main.css('margin-left')
        ].join(' ');
        alert(margin);
    });
    

    You can tweak it to return a compact value, eg. 10px 10px 10px 10px -> 10px.

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

Sidebar

Related Questions

http://jsfiddle.net/3BqtV/ Javascript: $(document).ready(function(){ $(#first).click(function(){ $(#secondHolder p).addClass('red'); }); $(.red).click(function(){ $(this).css(color,red); }); }) HTML: <p id=
I pasted the code given in this link to a file called md5.js. http://www.webtoolkit.info/javascript-md5.html
Given this HTML: <form id=formx> <input type=text value= /> </form> And this JavaScript: $(function()
I'm trying to solve this problem : http://uva.onlinejudge.org/external/7/732.html . For the given example, they
CSS file: http://useless-r-us.t15.org/projects/war/stylesheet.css JAVASCRIPT file: http://useless-r-us.t15.org/projects/war/engine.js The game itself (html code if you view
I was following a dropdown menu tutorial: http://net.tutsplus.com/tutorials/html-css-techniques/how-to-create-a-drop-down-nav-menu-with-html5-css3-and-jquery/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed:%20nettuts%20(NETTUTS)&utm_content=Netvibes What I really want to do
Given this structure for a websinte <html> <head> <!-- CSS at the beginning--> <link/>
Given this html: <div class=nation> <a href=library.php?type=nation&amp;id=America> <div class=nation-image> <img src=nations/America.png alt=snip /> </div>
Given this HTML: <div class=OpenIDSelector>some text</div> Why does this JQuery selector match it on
Given this HTML: <div id=foo> <input type=button class=foo abtn_1> <input type=button class=joe bbtn_2> <input

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.