Replace IMG SRC using CSS

/********************************************************************* * * REPLACE IMAGE SRC USING CSS * * https://css-tricks.com/replace-the-image-in-an-img-with-css/ * **********************************************************************/ .banner { display: block; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; background: url(http://notrealdomain2.com/newbanner.png) no-repeat; width: 96px; /* Width of new image */ height: 96px; /* Height of new image */ padding-left: 96px; /* Equal to width of new image */ }

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.