blob: b1f3c368cfe2a5db3488623d4b60a86a97dc51f6 [file] [log] [blame]
rwlbuis18a4a2f2007-07-10 09:21:47 +00001<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
4 <head>
5 <title>Align test</title>
6 <style type="text/css" media="all">
7 .center {
8 text-align : center;
9 }
10 </style>
11 <script type="text/javascript">
12 function runTest() {
13 var textElement;
14 var DOMObj = document.getElementById("body");
15
16 if (DOMObj == null) {
17 alert("Can't get element with id \"body\"");
18 return;
19 }
20
21 textElement = document.createElement("p");
22 textElement.setAttribute("class", "center");
23 textElement.appendChild(document.createTextNode("Should be centered"));
24
25 DOMObj.appendChild(textElement);
26 }
27 </script>
28 </head>
29 <body id="body" onload="runTest()">
30 <p>Below both lines should be centered. The first is static, the second is dynamically generated using javascript. Bug 14506.</p>
31 <p class="center">Should be centered</p>
32 </body>
33</html>