Skip to content

Commit

Permalink
Fixed position left sidebar
Browse files Browse the repository at this point in the history
  • Loading branch information
clj13001 committed Dec 3, 2016
1 parent ada2119 commit 32574c9
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 29 deletions.
19 changes: 19 additions & 0 deletions html/css/stylesheet.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,22 @@ a.divlink{
color: black;
}

div.sidebar{
display: inline-block;
border-right-style: solid;
height: 100vh;
background-color: #E9EAEB;
width: 300px;
position: fixed;
}

div.displayDevice{
display: inline-block;
position: absolute;
padding-left: 30px;
width: 100%;
height: 100%;
overflow: auto;
left: 300px;
}

2 changes: 1 addition & 1 deletion html/javascript/listing.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ function show(){

for(var i = 0; i < devices.length; i++){
if(type.localeCompare(devices[i].hardware) == 0 || type.localeCompare(devices[i].software) == 0){
html += '<div class = "deviceContainer"><div class = "imgContainer"><img src="../imgs/' + devices[i].hardware + '.png" class = "device">' + devices[i].name + '</div><div class = "deviceDescp"><p>' + devices[i].description + '</p></div></div><br>'
html += '<div class = "deviceContainer"><div class = "imgContainer"><img src="../imgs/' + devices[i].hardware + '.png" class = "device">' + devices[i].name + '</div><div class = "deviceDescp"><p>' + devices[i].description + '</p></div></div><br><br>'
}
}

Expand Down
7 changes: 5 additions & 2 deletions html/webpages/listingPage.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,17 @@
display: inline-block;
position: absolute;
padding-left: 30px;
overflow-y: scroll;
width: 100%;
height: 100%;
}

div.deviceContainer{
border: solid;
border-width: thin;
padding: 15px;
background-color: #E9EAEB;
display: inline-block;
}

div.imgContainer{
Expand All @@ -46,8 +50,7 @@
div.sidebar{
display: inline-block;
border-right-style: solid;
height: 100%;
width: 200px;
height: 100vh;
background-color: #E9EAEB;
}

Expand Down
12 changes: 0 additions & 12 deletions html/webpages/returnPage.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<link rel = "stylesheet" type = "text/css" href = "../css/stylesheet.css">
<style>
div.displayDevice{
display: inline-block;
position: absolute;
padding-left: 30px;
}

div.deviceContainer{
border: solid;
Expand Down Expand Up @@ -47,13 +42,6 @@
width: 200px;
}

div.sidebar{
display: inline-block;
border-right-style: solid;
height: 100vh;
background-color: #E9EAEB;
}

ul.nav{
padding: 0px;
}
Expand Down
14 changes: 0 additions & 14 deletions html/webpages/shoppingCart.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,10 @@
<link rel = "stylesheet" type = "text/css" href = "../css/stylesheet.css">

<style>
div.sidebar{
display: inline-block;
border-right-style: solid;
height: 100vh;
background-color: #E9EAEB;
}

ul.nav{
padding: 0px;
}

div.displayDevice{
display: inline-block;
position: absolute;
padding-left: 30px;
width: 100%;
}

div.ticket{
background-image: url('../imgs/ticket.png');
display: inline-block;
Expand Down

0 comments on commit 32574c9

Please sign in to comment.