Solved

Render SVG elements in Grid Layout

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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

This article will show, step by step, how to integrate R code into a R Sweave document
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
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…

706 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now