junger Posted June 30, 2016 Share Posted June 30, 2016 I have some SVG graphics. I have them set with a width:100% and height 100% I am able to move them along the x axis using the viewport but not sure what to set it at to make it directly centered. Thanks for your help. The site url: www.lensfirefilms.com Link to comment
alxfyv Posted July 1, 2016 Share Posted July 1, 2016 To help, one needs the site url. Consider editing your question (click on the small cogwheel icon to the right of the question title) to give this. I'm a retired attorney who was asked by a friend to build a website. In a prior lifetime, in a galaxy far, far away and long, long ago, I was a computer systems analyst / programmer. I'm a novice autodidact in CSS, JavaScript and HTML learning in part by example.. I've asked questions on this forum and been lucky enough to have others help me, so I'm inclined to answer any question I can. Pay it forward. Link to comment
junger Posted July 20, 2016 Author Share Posted July 20, 2016 I put the url in the question. For the time being, I have the svg set with their width and height, because I could not center them when I had the width and height at 100%. @alxfyv Link to comment
Irish Posted September 17, 2016 Share Posted September 17, 2016 @junger <div style="text-align:center;"> to the top of your svg code Link to comment
ajslad5 Posted March 26, 2021 Share Posted March 26, 2021 Paste the following at the top of your SVG code: <div style=" display: flex; justify-content: center; align-items: center;"> Don't forget to close this by adding </div> to the end of your code! Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.