diff options
| -rw-r--r-- | html/webbox.css | 34 | ||||
| -rw-r--r-- | html/webbox.js | 4 | 
2 files changed, 36 insertions, 2 deletions
| diff --git a/html/webbox.css b/html/webbox.css index 67d87b4..42761a5 100644 --- a/html/webbox.css +++ b/html/webbox.css @@ -209,3 +209,37 @@ table.list td.name {  	}  } +/* Tooltip container */ +.tooltip { +	position: relative; +	display: inline-block; +} + +/* Tooltip text */ +.tooltip .tooltiptext { +	visibility: hidden; +	background-color: #FFFFDD; +	color: #000000; +	text-align: center; +	padding: 5px; +	border-style: solid; +	border-width: 1px; +	border-color: #000000; +	position: fixed; +	right: 20px; +	bottom: 20px; +	z-index: 1; +} + +/* Show the tooltip text when you mouse over the tooltip container */ +.tooltip:hover .tooltiptext { +	visibility: visible; +} + +.fullwidth { +	width: 100%; +	border: 0; +	margin: 0; +	padding: 0; +	border-collapse: collapse; +} diff --git a/html/webbox.js b/html/webbox.js index 6cbf23d..b408078 100644 --- a/html/webbox.js +++ b/html/webbox.js @@ -27,7 +27,7 @@ function loadContents(dir) {  		var list = xhr.responseXML;  		listElements = list.getElementsByTagName("listentry"); -		var result = "<table class=\"list\">"; +		var result = "<div class=\"fullwidth tooltip\"><table class=\"list\">";  		if (listElements.length == 0) {  			result += "<tr><td class=\"type\"></td><td class=\"name\">(empty)</td></tr>"; @@ -49,7 +49,7 @@ function loadContents(dir) {  			}  		} -		result += "</table>" +		result += "</table><div class=\"tooltiptext\">To select entry,<br/>click and hold</div></div>"  		var listElement = document.getElementById("list"); | 
