question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

how to align the qr code to center?

See original GitHub issue

the qr code stays at the left side of the div. I have tried the css alignment, the style attributes to align it to center. Yet, the qr code still remains on the left side of the screen.

‘<div align="center" style="text-align:center;margin:0 auto;">’ <br> <div id="qrcode" align="center" style="text-align:center;margin:0 auto;" class="center"></div> <br> <input type="text" id="qr"> <button type="button" id="genqr">generate QR code</button> <input id="printuqr" type="button" onclick="printDiv('qrcode')" value="print QR"/> <script type="text/javascript"> $(document).ready(function(){ $("#genqr").click(function(){ // qrcode.clear(); new QRCode(document.getElementById("qrcode"), $('#qr').val()); }); $("#genqr").click(function(){ $("#printuqr").show(); }); });

</script> </div>

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:9

github_iconTop GitHub Comments

11reactions
scammicommented, Nov 9, 2018

Here is what I did <div style="display: flex; justify-content: center; text-align: center;" id="qrcode"></div>

11reactions
WebDevBoostercommented, Oct 8, 2017

The unresponsiveness to normal CSS styling sucks. Thumbs down 👎 from me. It amazes me how something so BASIC can be ignored in such a project…

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to properly align picture, text and QR-code vertically and ...
Ideally, the picture, the text and the QR code should be vertically top-aligned; the text should horizontally stick to the image, and the...
Read more >
How to make and generateQR Code with JavaScript
This tutorial is answering a question about how to center align the qr code image generated by qrcode.js library on my previous video: ......
Read more >
How to make and generate QR Code with JavaScript - YouTube
This tutorial is answering a question about how to center align the qr code image generated by qrcode.js library on my previous video: ......
Read more >
How to center CSS style an empty box for the QR camera?
There are many different ways to do what you want. align-self requires the element to be inside of a grid or flexbox element...
Read more >
QR Code Reader: How to change the button text and ... - Jotform
QR Code Reader: How to change the button text and center align it? · center horizontally the button in the container · center...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found