2

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,109
  • 2
  • 13
  • 29
user1140560
  • 169
  • 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

Remote
  • 1,421
  • 1
  • 10
  • 10