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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T20:26:45+00:00 2026-06-14T20:26:45+00:00

<style> .info{ width:94%; } </style> Now doing like this using JQuery $(‘.info’).css(‘width’); returns 94px

  • 0
<style>
.info{
        width:94%;
      }
</style>

Now doing like this using JQuery

$('.info').css('width');

returns 94px rather than the equivalent value in pixles (500px in my case.)

if i set the width in css as 105% , JQuery would return it as 105px .

The height and width of the parent container is 600px and 500px respectively.

  • 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-14T20:26:47+00:00Added an answer on June 14, 2026 at 8:26 pm

    I think a possible cause is the container of the element being hidden at the moment you’re trying to obtain the dimensions.

    I had a similar situation with nested divs and tables.

    See the following fiddle where I managed to reproduce the behavior:

    http://jsfiddle.net/36yvb/

    I still think it’s a bug in jQuery returning a percentage as an integer number (without the % sign) when not being able to actually compute the dimensions of the element.
    Change the width of #another-cell (expressed in %) and see it return the same value without the % sign when the table is hidden.

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

Sidebar

Related Questions

1) I have a site, using jQuery and the gMap Google Maps plugin. This
I am using galleria jquery plugin. I have a div with class carousel, This
I have some code in HTML and CSS where HTML looks like this: <div
I'm using Joomla 2.5.8 for my website. Now I want to style the articles
/* Style 1 */ .myclass { background:#ff0; border:1px solid #ff0 } #myid { width:80px;
Flash-style Tween/Easing Functions in C# I came across this post on the internet today.
The style should be like iBooks or pictures in foursquare. When we flip to
Im attempting to style this plugin into my rails 3.2 app and having some
How do I style width for -webkit only? All of my select boxes are
So I've got style.css which defines all my CSS classes. But I want to

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.