Bug Tracker

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#10894 closed bug (duplicate)

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:


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

Change History (3)

comment:1 Changed 5 years ago by arty.name

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

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

comment:2 Changed 5 years ago by dmethvin

  • Resolution set to duplicate
  • Status changed from new to closed

comment:3 Changed 5 years ago by dmethvin

Duplicate of #10782.

Note: See TracTickets for help on using tickets.