JSFiddle - React, Tailwind, and code Playground
HTML
<body>
<div id='top'></div>
<div id='left'>1<br>1<br>1<br>1<br>1<br>1<br>1<br>1<br>1<br>1<br>1<br>1<br>1<br>1<br>1<br>1<br>1<br></div>
<div id='right'>1<br>1<br>1<br>1<br>1<br>1<br>1<br>1<br>1<br>1<br>1<br>1<br>1<br>1<br>1<br>1<br>1<br>1<br>1<br>1<br>1<br><div class="fileform">
<div id="fileformlabel"></div>
<div class="selectbutton">выбрать </div>
<input type="file" name="upload" id="upload" onchange="getName(this.value);" />
</div><br>1<br>1<br>1<br>1<br></div>
<div id='bottom'></div>
</body>
CSS
html, body {
height: 100%;
margin: 0
}
body {
position: relative;
}
#top {
height: 30px;
background: yellow;
}
#bottom {
position: fixed;
bottom:0;
height: 10px;
background: blue;
width: 100%;
}
#left {
position: fixed;
width: 100px;
background: red;
left:0;
top: 0;
bottom: 0;
overflow-y: auto;
color: #fff;
margin: 30px 0 10px;
z-index: 10;
}
#right {
position: fixed;
width: 100%;
right:0;
top: 0;
bottom: 0;
margin: 30px 0 10px 110px;
padding-left: 110px;
overflow-y: auto;
background: green;
color: white;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.fileform {
cursor: pointer;
height: 26px;
overflow: hidden;
position: relative;
text-align: left;
vertical-align: middle;
width: 80px;
}
.fileform .selectbutton {
background-color: #A2A3A3;
border: 1px solid #939494;
border-radius: 2px;
color: #FFFFFF;
float: right;
font-size: 16px;
height: 20px;
line-height: 20px;
overflow: hidden;
padding: 2px 6px;
text-align: center;
vertical-align: middle;
width: 60px;
}
.fileform #upload{
position:absolute;
top:0;
left:0;
width:100%;
-moz-opacity: 0;
filter: alpha(opacity=0);
opacity: 0;
font-size: 150px;
height: 30px;
z-index:20;
cursor: pointer;
}
.fileform #fileformlabel {
float: left;
height: 22px;
line-height: 22px;
overflow: hidden;
text-align: left;
vertical-align: middle;
}
JavaScript
function getName (str){
if (str.lastIndexOf('\\')){
var i = str.lastIndexOf('\\')+1;
}
else{
var i = str.lastIndexOf('/')+1;
}
var filename = str.slice(i);
var uploaded = document.getElementById("fileformlabel");
uploaded.innerHTML = filename;
}