SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    Nov 2012
    Posts
    52
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Lightbulb To decode base64 for css.

    Not sure where to post it.

    I tried many online decoders for base64 to decode following css but no luck. Any idea?

    HTML Code:
    .icon{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjZEQTg0QjE4QzBDMjExRTE4MjM1ODZDMDczNEQ0NTYyIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjZEQTg0QjE5QzBDMjExRTE4MjM1ODZDMDczNEQ0NTYyIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6NkRBODRCMTZDMEMyMTFFMTgyMzU4NkMwNzM0RDQ1NjIiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6NkRBODRCMTdDMEMyMTFFMTgyMzU4NkMwNzM0RDQ1NjIiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz748ylpAAABUklEQVR42mJsXl/OgASEgDgNiM2A2BiI2YD4LBT3AfFHmELGh//ughmLNs7yAFIrgJifATt4CsQpcf5pO4BqIRqBDG+g4EYgZmYgDOKAeDGzsAEnyHn7gZgbl0pdNUMGCREphpdvn4O4riAHsgCJfKjfsAItZT0GQ01TOP/SzXM8QCqTCUj4IZusLKcGV6SuqMVgomMB53/78Q3G9APZqA5i6akbMRhomDD8//8fEmqMTAzmejZwTccuHGK48/AG3EyQRmZGRkYGXi4+qAZGBisDexTnHj1/gOHuo1soYiCn3gHZcuzCQbgkSDMI49IEBI9AGjeBWOia8WgCgd0gp04B4hwg5oFpBoEXb5/h0vQLlIqYgCkBlCKyYKIgzXhsAoEykPdACQAcPUB8HojtgJgPhwZQOk0G4jmwwIEBkF+1gbgDZCJyQEC9A5JbBhMECDAAiK50x644kBoAAAAASUVORK5CYII=);width:14px;height:14px;margin:5px}

  2. #2
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,810
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    The following HTML should do it:

    <div class="icon"></div>
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  3. #3
    Gre aus'm Pott gold trophysilver trophybronze trophy
    Pullo's Avatar
    Join Date
    Jun 2007
    Location
    Germany
    Posts
    5,938
    Mentioned
    214 Post(s)
    Tagged
    12 Thread(s)
    The big jumble of letters and numbers is just the base64 representation of a png file.

    The whole thing is nothing more than:

    Code:
    .icon{
      background-image:url(...);
      width:14px;
      height:14px;
      margin:5px
    }
    You can decode the base64 string here: http://www.motobit.com/util/base64-decoder-encoder.asp

    This is what it looks like: base64.png


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •