how to align the qr code to center?
See original GitHub issuethe 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:
- Created 6 years ago
- Comments:9
Top GitHub Comments
Here is what I did
<div style="display: flex; justify-content: center; text-align: center;" id="qrcode"></div>
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…