cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

Code Indentation

     

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

            
              <div class="logoContainer">
<img src="http://imrankhalid.me/wp-content/uploads/2017/07/images.png">
</div>
<div class="fileContainer sprite">
<span>choose file</span>
<input type="file"  value="Choose File">
</div>
            
          
!
            
              .logoContainer{
	width:140px;
	height:151px;
	margin: 15px auto 0 auto;
	/*background: url(http://img1.wikia.nocookie.net/__cb20130901213905/battlebears/images/9/98/Team-icon-placeholder.png) no-repeat 0 0;*/
	padding: 11px 10px 21px 10px;
	text-align: center;
	line-height: 120px;
}
.logoContainer img{
	max-width:100%;
}
.fileContainer{
	background:#ccc;/* you can give it background img as well*/
	width: 202px;
	height: 31px;
	overflow:hidden;
	position:relative;
	font-size:16px;
	line-height: 31px;
	color:#434343;
	padding: 0px 41px 0 53px;
	margin: 0 auto 60px auto;
	cursor: pointer !important;
}
.fileContainer span{
	overflow:hidden;
	display:block;
	white-space:nowrap;
	text-overflow:ellipsis;
	cursor: pointer;
}
.fileContainer input[type="file"]{
	opacity:0;
	margin: 0;
	padding: 0;
	width:100%;
	height:100%;
	left: 0;
	top: 0;
	position: absolute;
	cursor: pointer;
}
            
          
!
            
              $("input:file").change(function (){
		var fileName = $(this).val();
		if(fileName.length >0){
    $(this).parent().children('span').html(fileName);
		}
		else{
			$(this).parent().children('span').html("Choose file");

		}
	});
	//file input preview
	function readURL(input) {
		if (input.files && input.files[0]) {
				var reader = new FileReader();            
				reader.onload = function (e) {
						$('.logoContainer img').attr('src', e.target.result);
				}
				reader.readAsDataURL(input.files[0]);
		}
	}
	$("input:file").change(function(){
			readURL(this);
	});
            
          
!
999px
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

Loading ..................

Console