[Webkit-unassigned] [Bug 31241] New: Absolutely positioned, inline elements within a container that horizontally centers
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sun Nov 8 10:38:18 PST 2009
https://bugs.webkit.org/show_bug.cgi?id=31241
Summary: Absolutely positioned, inline elements within a
container that horizontally centers
Product: WebKit
Version: 528+ (Nightly build)
Platform: PC
OS/Version: All
Status: UNCONFIRMED
Severity: Normal
Priority: P2
Component: Layout and Rendering
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: samail91 at yahoo.com
Created an attachment (id=42715)
--> (https://bugs.webkit.org/attachment.cgi?id=42715)
Reveals a rendering bug in webkit. Absolutely position, inline elements should
remain centered until left or right properties are set.
Whenever an an inline element's position property is set to absolute and the
left, right, top and bottom properties are left to their defaults(auto), and
the parent element has text-align property set to center, the element does not
keep it's position.
CSS:
#element {
position: absolute;
}
#parent {
text-align: center;
width: 500px;
height: 300px;
}
HTML:
<div id="parent">
<span id="element">Test</span>
</div>
The span should remain centered within it's parent until the left or right
properties are explicitly set. However, if we add an inline element or text
before the span:
<div id="parent">
Text or or <span>some other inline element</span><span
id="element">Test</span>
</div>
The element centers along with the elements/text before it.
I've attached an example that shows the unexpected behavior that occurs if the
position property was set to absolute via javascript.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list