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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T06:17:54+00:00 2026-05-15T06:17:54+00:00

I have a small question concerning css styles and javascript / jquery. Lets say

  • 0

I have a small question concerning css styles and javascript / jquery. Lets say i define the following css style.

.myStile { padding: 5px }

Now I’d like to access the property of padding while not writing an html element to the document. I came up with the following idea which only works with Firefox (IE and Chrome say NaN)

var div = $('<div class="myStile />');
var padding = parseInt(div.css('padding-left'), 10);

is there a way to make this work in IE and Chrome (well trident and webkit I guess) as well? I know that one’s able to read whole css files via javascript (and get the class, the properties and so on …), but that seems to be a bit overkill.

  • 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-15T06:17:55+00:00Added an answer on May 15, 2026 at 6:17 am

    Thanks meo for your comment. This post answers the question. Here’s a google find which answers the “other browsers than chrome, firefox, safari” issue.

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

Sidebar

Related Questions

I'm writing a small webapp in Grails and I have the following question regarding
I have an small question I didn't found an answer yet: how do I
A small question concerning downloading xml files from a remote server. I am using
hope all of you doing well. I have small question in C#.Net. actually i
I have a small question to ask the community. I am wondering why my
I have one small question about the pumping lemma for regular languages - is
Hi Friends, I have a small question, I have a paragraph of string, now
I have small page which has label, DropDownList and a submit button. <div> <asp:label
I have small problem with my .net 2.0 winforms application. I want to embed
Where I work, we have small teams of 2 - 5 people. As a

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.