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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T05:01:04+00:00 2026-05-15T05:01:04+00:00

When there is no border, why IE returns medium while FF returns 0px on

  • 0

When there is no border, why IE returns medium while FF returns 0px on the following query ?

.css("border-left-width")

I checked this in FF 3.6.3 and IE 6/7.

Example here

  • 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-15T05:01:05+00:00Added an answer on May 15, 2026 at 5:01 am

    Using css() to read stylesheet-applied styles does different things on different browsers.

    On IE, it reads values from the IE-specific currentStyle object, which is the only way to access this information. currentStyle gives you what CSS calls the ‘specified style’, that is to say just what you wrote in the stylesheet. If you haven’t overridden it, the initial value of border-width is ‘medium’ so that’s directly what you get.

    On other browsers, css() uses the standard DOM Level 2 CSS method getComputedStyle(). Unlike IE’s currentStyle, this returns the ‘computed style’, which is different from the specified style in that relative units like ‘medium’ are resolved to actual lengths.

    Here ‘medium’ would normally resolve to a length of about 3px, but you presumably haven’t actually turned the border on for that element, so it defaults to border-style: none. That makes the border-width resolve to zero.

    Usually the ‘specified style’ and the ‘computed style’ are close enough to each other that you can get away with treating them in the same way, and that’s what jQuery’s css() method is relying on. But in reality they aren’t quite the same.

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

Sidebar

Related Questions

Are there any differences when it comes to performance between the following three border
Isn't there a CSS way of having the page to get a border around
There's a div2 here that has transparency using a css style tag. However the
I'm attempting to get the width of an element's border with $('#foo').css('border-width-bottom') , but
Is there a way to set the sides of the border of a UIView
Is there any way to change the BackColor of the border of a panel
Possible Duplicate: How to remove border around text/input boxes? (Chrome) Is there a way
I have this CSS #popup .title:hover:after { content: hide; position: absolute; top: 3px; right:
Group, I have a quick question? -Is there a way to trigger this onclick
Here is my specific problem: Xaml: <local:ShrinkableContentControl x:Name=m_ShrinkableContentControl> <Border Background=SkyBlue> <Button Click=Button_Click_1 Content=Hello/> </Border>

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.