Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Render SVG elements in Grid Layout

Posted on 2014-01-21
3
638 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 500 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

I've been asked to discuss some of the UX activities that I'm using with my team. Here I will share some details about how we approach UX projects.
Does your audience prefer people in photos or no people? How can you best highlight what you’re selling? What are your competitors doing, and what can you do that is different and unique from them?  Continue reading to learn how to make your images …
The viewer will learn how to count occurrences of each item in an array.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

791 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