Closed Bug 237299 Opened 22 years ago Closed 22 years ago

div that centers its children via text-align:center does not center contained (unordered) list

Categories

(Core :: Layout: Block and Inline, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 22816

People

(Reporter: Simon.Richter, Unassigned)

Details

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040113 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040113 The following code example demonstrates this problem: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title>Testcase</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> <div style="text-align: center; width: 100%;"> <ul style="width: 200px;"> <li>Lorem ipsum asflkhna dfadk faö djsf asmfalfk aksjd asdasd asd asdasd asdasd asdasd asdas sdg sda a sgsfgsdg</li> </ul> <p>Test</p> </div> </body> </html> Reproducible: Always Steps to Reproduce: 1. Display the HTML testcase above in Mozilla. Actual Results: The block level element generated by the unordered list is left-justified within the block generated by the <DIV>. Expected Results: The block level element generated by the unordered list should be centered within the block generated by the <DIV>. Internet Explorer 6.0 agrees with me, Opera 7.11 exhibits the same behaviour as Mozilla.
Mozilla and Opera are correct. *** This bug has been marked as a duplicate of 22816 ***
Status: UNCONFIRMED → RESOLVED
Closed: 22 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.