I have been trying to remove the space that forms between the rows of the tables. This is what I have tried.
I just tried to put border: 1 px solid black and still does not take the form I would like. I want the grid to be left without that double line that is observed.
var div = document.getElementById("click");
guessX = 0;
guessY = 0;
function capturaCoor(event) {
var x = event.offsetX;
var y = event.offsetY;
guessX = x;
guessY = y;
console.log("x coords: " + guessX + ", y coords: " + guessY);
}
var i, j;
for (i = 0; i < 525; i++) {
$("#click").prepend($('<div class="re"></div>'));
}
$(".re:odd").css("background-color", "white");
body,
html {
padding: 0;
margin: 0;
}
.re {
height: 20px;
width: 20px;
background-color: black;
cursor: pointer;
border-bottom: 1px solid;
border-top: 1px solid;
}
.re:hover {
background-color: red;
}
#click {
width: 500px;
height: 500px;
border: 1px solid black;
display: flex;
flex-wrap: wrap;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div id="click" onclick="capturaCoor(event)"></div>
Greetings!