Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#6901 closed bug (notabug)

Dialogs are not centered horizontally in Chrome 8

Reported by: Rising Owned by:
Priority: minor Milestone: 1.9.0
Component: ui.dialog Version: 1.8.9
Keywords: Cc:
Blocked by: Blocking:

Description

When the following page is displayed in Chrome 8.0.552.237 (the current version) or Safari 5.0.3 on Windows XP, the dialog is centered vertically but is aligned with the left margin (i.e., left = 0). In IE8 and Firefox 3.6.13, the dialog is centered horizontally as expected.

jQuery 1.4.4, jQuery UI 1.8.9

<!DOCTYPE>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
<script type="text/javascript">
$(function() {
    $('#d').dialog();
});
</script>
</head>
<body>
<div id="d" style="border: 1px solid #000;">
Hello!
</div>
</body>
</html>

Change History (4)

comment:1 Changed 9 years ago by Scott González

Resolution: invalid
Status: newclosed

You need to include the jQuery UI CSS.

comment:2 Changed 9 years ago by jayhoytt

Experiencing the same issue on Chrome 8.0.552.237 (Win) while using style sheet.

<!DOCTYPE>
<html>
<head>
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/themes/smoothness/jquery-ui.css" type="text/css" /> 
 
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script> 
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.9/jquery-ui.min.js"></script> 
<script type="text/javascript">
$(function() {
    $('#d').dialog();
});
</script>
</head>
<body>
<div id="d" style="border: 1px solid #000;">
Hello!
</div>
</body>
</html>

comment:3 Changed 9 years ago by jayhoytt

Ignore above. PEBKAC. Sorry, PEBKAC. Issue resolved when CSS version is matched with jQuery UI version.

comment:4 Changed 9 years ago by Scott González

#6907 is a duplicate of this ticket.

Note: See TracTickets for help on using tickets.