Bug Tracker

Opened 12 years ago

Closed 12 years ago

Last modified 11 years ago

#7419 closed bug (duplicate)

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

Reported by: [email protected] Owned by:
Priority: undecided Milestone: 1.5
Component: css Version: 1.4.3
Keywords: Cc:
Blocked by: Blocking:


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/

Change History (4)

comment:1 Changed 12 years ago by anonymous

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

comment:2 Changed 12 years ago by Rick Waldron

Component: unfiledcss
Resolution: duplicate
Status: newclosed

This is fixed in 1.4.4rc2

comment:3 Changed 12 years ago by Rick Waldron

Duplicate of #7395.

comment:4 Changed 12 years ago by Xotic750

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


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

Note: See TracTickets for help on using tickets.