Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Render SVG elements in Grid Layout

Posted on 2014-01-21
3
Medium Priority
?
701 Views
Last Modified: 2014-01-21
Attached I have a simple HTML file that renders 6 charts all SVG elements.  Currently, they all are rendered in a single column centered in the middle of the body.  I'd like to render them in a grid style layout - 2 rows, 3 in each row.  

Any help would be greatly appreciated!  Thanks for the time! :)
index.html
0
Comment
Question by:cbrune
  • 2
3 Comments
 
LVL 38

Accepted Solution

by:
Tom Beck earned 2000 total points
ID: 39797869
The svg elements created are 800px wide. To get three side by side you need to increase the body width to 2400px.

body {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  margin: auto;
  position: relative;
  width: 2400px;
}

Then you can just float the svg elements left and they will automatically go to the second row after the first three.

svg {
  font: 15px sans-serif;
  fill:#bdc3c7;
  float: left
}
0
 

Author Closing Comment

by:cbrune
ID: 39798414
Brilliant!  Thank you for the help! :)
0
 
LVL 38

Expert Comment

by:Tom Beck
ID: 39798420
You're welcome. Thanks for the points.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article was originally published on Monitis Blog, you can check it here . Today it’s fairly well known that high-performing websites and applications bring in more visitors, higher SEO, and ultimately more sales. By the same token, downtime…
Dramatic changes are revolutionizing how we build and use technology. Every company is automating, digitizing, and modernizing operations. We need a better, more connected way to work together as teams so we can harness the insights from our system…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
Suggested Courses

885 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question