So I have made something that looks like this but I want it to look like this. I have used a div around the text but this moves it to a next line. I have also tried margin-top: -10px; or top: -10px; but to no use. line-height:0px; does not work too. Here is the code:
var wood = 15;
document.getElementById("wood").innerHTML = wood;
#resources {
white-space: nowrap;
font-weight: bold;
position: absolute;
margin-top: 825px;
margin-left: 25px;
}
#nadpisResources {
position: absolute;
font-size: 45px;
}
#resourcesHodnoty {
position: absolute;
margin-left: 50px;
margin-top: 50px;
font-size: 35px;
font-weight: bold;
}
<div id="resources">
<div id="nadpisResources">Resources:</div>
<div id="resourcesHodnoty">
<img src="ikonyNavic/wood.png" width="50px;" height="50px;">
<div style="display: inline-block; margin-top:-30px"> Wood: <element id="wood"></element></div>
</div>
</div>