Skip to content

Commit

Permalink
fixed scrolling in browse window
Browse files Browse the repository at this point in the history
  • Loading branch information
tash-had committed Jul 1, 2018
1 parent 9603286 commit f73d3c8
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 17 deletions.
13 changes: 11 additions & 2 deletions browse.css
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,15 @@ img.hover-shadow {
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}

#selectedImageDiv {
text-align: center;
#selectedImageDiv{
position: fixed;
text-align: center !important;
vertical-align: middle;
margin-left: 35%;
margin-top: 5%;
/* width: 70%; */
}

#folderContentsColDiv{
margin-top: 2%;
}
27 changes: 15 additions & 12 deletions browse.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,23 @@
<link rel="stylesheet" href="browse.css">
</head>
<body>
<nav>
<div class="nav-wrapper" style="background-color: #2196fe">
<a class="brand-logo center" >CheapTags</a>
</div>
</nav>
<div id="contentDiv" class="row">
<div id="folderContentsColDiv" class="column">
</div>
<div id="selectedImageDiv" class="column">
<img id="selectedImg" width="100%" src="" alt="">
</div>
<div class="navbar-fixed">
<nav>
<div class="nav-wrapper" style="background-color: #2196fe">
<a class="brand-logo center" >CheapTags</a>
</div>
</nav>
</div>

<!-- Modal Structure -->
<div id="contentDiv" class="row">
<div id="folderContentsColDiv" class="column">
</div>
<div id="selectedImageDiv" class="column">
<img id="selectedImg" width="100%" src="" alt="">
</div>
</div>

<!-- Modal Structure -->
<div id="noPicturesAlert" class="modal">
<div class="modal-content">
<h6>No Pictures</h6>
Expand Down
3 changes: 2 additions & 1 deletion browse.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ function renderPictures(picPathArr){
const img = document.createElement("img");
img.className = "folderImage hover-shadow cursor";
img.src = picPath;
img.style = "width:60%";
img.style = "width:70%";
img.addEventListener("click", function(){
setSelectedImage(picPath);
});
Expand All @@ -72,4 +72,5 @@ function sendNoPicsFoundErr(){
function setSelectedImage(path){
let selectedImg = document.getElementById("selectedImg");
selectedImg.src = path;
selectedImg.style = "width:200%; height:200%;";
}
5 changes: 3 additions & 2 deletions home.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#btnContainer{
text-align: center;
margin-top: 20%;

}

.btnDiv{
Expand All @@ -9,5 +11,4 @@
.btn{
background-color: #2196fe !important;
width: 200px !important;

}
}

0 comments on commit f73d3c8

Please sign in to comment.