Open GoogleCodeExporter opened 9 years ago
This is the same solution as Issue 117.
I have found what the problem is. I want to centre the canvas. I tried:
<style>
canvas
{
text-align:center;
}
</style>
This did not work in Firefox or IE. The only way that I could do it is to
define the canvas as:
<p style="text-align:center;">
<!-- Define the canvas that the clock and hands will be placed on -->
<canvas id="MMCanvas" width="300" height="300" style="border:1px solid #dedede; text-align:center;" >
YOUR BROWSER DOES NOT SUPPORT THE CANVAS TAG.
</canvas>
</p>
This works just fine in Firefox.
When I removed the paragraph, specifically the alignment, it also worked in IE.
I do not know if:
- The code working in Firefox, works because of a fluke, and it should not work
- There is a problem that the style SHOULD be able to centre the canvas
- There is a problem in excanvas.js, and it gets confused when trying to work within a centered paragraph.
Anyway, by centering the body, aligning paragraphs left and removing the paragraph definition from around the canvas definition my clock is now displaying correctly.
John
Original comment by crawf...@neptune.on.ca
on 8 Apr 2012 at 1:27
Original issue reported on code.google.com by
crawf...@neptune.on.ca
on 5 Apr 2012 at 1:01