Skip to main content

Search and Top Navigation

#7819 closed bug (notabug)

Opened October 27, 2011 10:38PM UTC

Closed October 28, 2011 12:11AM UTC

positon() does not work when div contains multiple spans

Reported by: JVerstry Owned by:
Priority: minor Milestone: 1.9.0
Component: ui.position Version: 1.8.16
Keywords: Cc:
Blocked by: Blocking:

Following a question I asked on StackOverflow (, it seems like there is a bug in the position() method when trying to position a div containing spans, within another div.

If each spans is not followed by a <br /> (except for the last one), the position() method does not work. There is no error message thrown by FireBug and I a could not find any documentation related to this. Setting a value for collision does not help.

The SO question contains screenshots and code samples.

Attachments (0)
Change History (3)

Changed October 27, 2011 10:55PM UTC by JVerstry comment:1

I have create a code example at:

In this example, even if I add a <br /> after each span, it does not solve the issue.

Changed October 27, 2011 11:53PM UTC by JVerstry comment:2

After discussions in the SO question, someone found out that the enclosing div MUST have an explicit height or width. This is not mentioned in the documentation.

Changed October 28, 2011 12:11AM UTC by scottgonzalez comment:3

component: ui.coreui.position
resolution: → invalid
status: newclosed

That's because your elements are all floated, so they don't have the dimensions that you think they have.