JSFiddle - React, Tailwind, and code Playground
HTML
<!doctype html>
<html lang="en">
<body>
<nav>
<ul>
<li>
<a href="#">
test1
</a>
</li>
<li>
<a href="#">
test2
</a>
</li>
<li>
<a href="#">
test3
</a>
</li>
<li>
<a href="#">
test4
</a>
</li>
<li>
<a href="#">
test5
</a>
</li>
<li>
<a href="#">
test6
</a>
</li>
</ul>
</nav>
<div class="info">
Test cordinates by clicking<br>
X = <span data-x>0</span><br>
Y = <span data-y>0</span><br>
<b>ABCDEFGHIJKLMNOPQRSTUVWXYZ</b>
</div>
</body>
</html>
CSS
* {
margin: 0;
box-sizing: border-box;
transition: all 0.2s;
}
html, body {
width: 100%;
height: 100%;
overflow: hidden;
}
body {
font-family: arial;
font-size: 20px;
line-height: 1.5;
padding: 100px 40px 0;
background: #eee;
position: fixed;
top: 0;
left: 0;
}
nav {
display: block;
width: 100%;
position: fixed;
z-index: 13;
top: 0;
left: 0;
font-size: 15px;
letter-spacing: 0.1em;
background: #333;
}
nav ul {
list-style: none;
height: 60px;
}
nav ul li {
float: left;
height: 60px;
}
nav ul li a {
display: inline-block;
height: 60px;
line-height: 60px;
padding: 0 25px;
color: #fff;
border-left: 1px solid #777;
text-transform: uppercase;
text-decoration: none;
}
nav ul li a:hover {
background: #444;
}
nav ul li:last-child a {
border-right: 1px solid #777;
}
.info {
float: left;
width: 100%;
}
b {
font-weight: normal;
letter-spacing: 5px;
}
JavaScript
document.addEventListener('click',function(e) {
e.preventDefault();
document.querySelector('[data-x]').innerHTML = e.pageX;
document.querySelector('[data-y]').innerHTML = e.pageY;
});