-
-
Save SaffatHasan/193b9379eb52ef52c21e948730ac6988 to your computer and use it in GitHub Desktop.
Snippet of HTML and CSS for the legend box
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<style> | |
#legend { | |
position:absolute; | |
bottom:20px; | |
right: 5px; | |
background: #D3D3D3; | |
border-radius: 10px; | |
display: block; | |
padding: 10px; | |
color: #6E6E6E; | |
font-family:sans-serif; | |
text-align:center; | |
width:160px; | |
border:1px solid black; | |
} | |
ul{ | |
padding:0; | |
margin-left:10px; | |
margin-right:0px; | |
} | |
li { | |
font-family:sans-serif; | |
font-size: 0.8em; | |
list-style-type: none; | |
margin-top:10px; | |
margin-bottom:10px; | |
vertical-align:middle; | |
padding-right:50px; | |
padding-left:30px; | |
} | |
.header { | |
margin: 1px 1px 1px 1px; | |
text-align: center; | |
font-weight:bold; | |
} | |
.circle { | |
position:relative; | |
border-radius: 50%; | |
width: 15px; | |
height: 15px; | |
float:left; | |
} | |
</style> | |
</head> | |
<body> | |
<div id='legend'> | |
<div class="header">% Structural <br>Components in SGR</div> | |
<ul> | |
<li id="3"> | |
<div class="circle" style="background:#d73027" id="3"></div> | |
61-79% | |
</li> | |
<li id="2"> | |
<div class="circle" style="background:#FF6600" id="2"></div> | |
41-60% | |
</li> | |
<li id="1"> | |
<div class="circle" style="background:#ffff00" id="1"></div> | |
21-40% | |
</li> | |
<li id="0"> | |
<div class="circle" style="background:#1a9850" id="0"></div> | |
0-20% | |
</li> | |
</ul> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment