How to place two <g> side by side in an svg?

Posted by A_user on Stack Overflow See other posts from Stack Overflow or by A_user
Published on 2012-07-04T07:37:27Z Indexed on 2012/07/04 9:16 UTC
Read the original article Hit count: 139

Filed under:
|

Hello all I am new to html5 and svg tag.I want to ask a question about svg html element. Here is my code

<html>
 <div>
   <svg width = "1335" height = "400">
     // I want to have two svg:g side by side one of more width and second of less width
        such that width of svg = first g + second g
      <g>
          // All the elements inside g should have same width as g
      </g>
      <g>
      </g> 
   </svg>
 <div>
</html>

I have tried it using transform.But failed. Is it possible to have two g elements side by side as I can't set x and y of g ? Can any one guide me of doingthis another way.

© Stack Overflow or respective owner

Related posts about html5

Related posts about svg