Skip to main content

Bug Tracker

Side navigation

#10894 closed bug (duplicate)

Opened November 25, 2011 02:15PM UTC

Closed November 26, 2011 02:43AM UTC

Last modified November 26, 2011 02:43AM UTC

CSS percents are sometimes parsed as pixels for element dimensions

Reported by: arty.name Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.7.1
Keywords: Cc:
Blocked by: Blocking:
Description

In some cases .width() and .height() return incorrect values for element. These values are percent values which are parsed to numbers as pixel values. The example is simple:

jQuery('<div/>').css({height: '100%'}).height() // 100

Attachments (0)
Change History (3)

Changed November 25, 2011 02:18PM UTC by arty.name comment:1

Oops, missed code formatting, it should be like that:

  jQuery('<div/>').css({height: '100%'}).height() // 100
  

Changed November 26, 2011 02:43AM UTC by dmethvin comment:2

resolution: → duplicate
status: newclosed

Changed November 26, 2011 02:43AM UTC by dmethvin comment:3

Duplicate of #10782.