New to Telerik UI for ASP.NET AJAX? Download free 30-day trial

How to apply a Custom Logo to the RadBarcode QR Code


Product RadBarcode for ASP.NET AJAX


If you are curious to learn how to position an icon in the center of the Telerik RadBarcode check out the solution below:


To position an icon in the center of the Telerik RadBarcode for ASP.NET AJAX control, you need to overlay the icon on top of the barcode using CSS positioning. Here's a step-by-step guide to achieve this:

  1. Position the icon right after or before the RadBarcode control inside a container (like a div):
    <div class="barcode-container">
    <telerik:RadBarcode runat="server" ID="RadBarcode1" Type="QRCode" Text="" Width="150" Height="150"></telerik:RadBarcode>
    <img src="" class="centered-icon" />
  2. CSS for Centering the Icon: Use absolute positioning to center the icon on top of the barcode. The .barcode-container will have relative positioning to act as a reference point for the absolute positioning of the icon:
    .barcode-container {
        position: relative;
        width: 150px; /* Same as barcode width */
        height: 150px; /* Same as barcode height */
    .centered-icon {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 24px; /* Adjust as per your needs */
        height: 24px; /* Adjust as per your needs */

Ensure Icon Visibility: If your barcode type is dense (like QR codes), make sure your icon has a transparent background and is easily distinguishable from the barcode itself. Additionally, keep in mind that placing an icon over the barcode might make it unreadable if it covers too many data portions of the barcode. If you're planning to scan the barcode, always test its readability after applying the overlay.

In this article