SVG and parent height of svg different - HTML CSS SVG

HTML CSS examples for SVG:svg element

Description

SVG and parent height of svg different

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">

.canvas {<!--from   www .j  a v  a  2 s.c  o m-->
   float: left;
}
.canvas {
   background-color: gray;
}
.container {
   background-color: red;
}


      </style> 
 </head> 
 <body> 
  <div class="container"> 
   <svg class="canvas" style="height: 50px"></svg> 
  </div>  
 </body>
</html>

Related Tutorials