1

I have set borders and margins to zero.

<div class='nobordermargin'>hello</div>

<canvas class='nobordermargin' id="myCanvas" 
width="300" height="150"></canvas>

<div class='nobordermargin'>hello</div>

The jsbin demo

Dulara Malindu
  • 1,477
  • 4
  • 18
  • 37
user1140560
  • 179
  • 1
  • 10

1 Answers1

2

You just need to set canvas to { display: block; } as it's inline by default.

JSBin Snapshot

Also see here: Inline Elements | MDN