Skip to main content

Bug Tracker

Side navigation

#7419 closed bug (duplicate)

Opened November 05, 2010 06:45PM UTC

Closed November 05, 2010 07:09PM UTC

Last modified March 13, 2012 05:38PM UTC

css() function returns physical height/width rather than the CSS attribute value when 100%

Reported by: paul.crowder@blackbaud.com Owned by:
Priority: undecided Milestone: 1.5
Component: css Version: 1.4.3
Keywords: Cc:
Blocked by: Blocking:
Description

When an element has its height or width CSS attribute set to "100%", the jQuery css() function returns the physical bounds of the element rather than the CSS attribute value. In version 1.4.2 the css() function returned "100%" as expected.

Example (toggle between version 1.4.2 and 1.4.3 to see the difference in behavior): http://jsfiddle.net/MXEvc/

Attachments (0)
Change History (4)

Changed November 05, 2010 06:56PM UTC by anonymous comment:1

Note that I was able to duplicate the issue in the following browsers on Windows 7:

  • Chrome 7.0
  • Firefox 3.6
  • IE 8
  • Opera 10.6

Changed November 05, 2010 07:09PM UTC by rwaldron comment:2

component: unfiledcss
resolution: → duplicate
status: newclosed

This is fixed in 1.4.4rc2

Changed November 05, 2010 07:09PM UTC by rwaldron comment:3

Duplicate of #7395.

Changed November 06, 2010 12:43AM UTC by Xotic750 comment:4

I wouldn't say fixed but in #7283 it was stated that:

>this is definitely the desired result now

Though, in all versions that I have used (1.2.6, 1.3.2, 1.4.2) until 1.4.3, the query of inline css using

.css("width")

would always return the text value, i.e. 50% or 1em etc.rather than a calculated pixel value.