JSFiddle - React, Tailwind, and code Playground
HTML
<font face="Arial" size="2" color="black">
<p align="center">
<img src="http://www.vtsim.com/image/head_trz_1.png"><a href="http://fs.vtsim.com" border="0"><img src="http://www.vtsim.com/image/head_trz_2.png"></a>
</p>
<div class="header">
//--- now starts the menu wich I pretend to be kept fixed on top when scrolling
<p align="center">
<a href="http://trainz.vtsim.com" border="0"><img src="http://www.vtsim.com/image/b_home_a.png"></a><a href="http://trainz.vtsim.com/trains.htm" border="0"><img src="http://www.vtsim.com/image/b_trz_trains_i.png"></a><a href="http://trainz.vtsim.com/tracks.htm" border="0"><img src="http://www.vtsim.com/image/b_trz_tracks_i.png"></a><a href="http://trainz.vtsim.com/trackside.htm" border="0"><img src="http://www.vtsim.com/image/b_trz_trkside_i.png"></a><a href="http://trainz.vtsim.com/scenery.htm" border="0"><img src="http://www.vtsim.com/image/b_trz_scenery_i.png"></a><a href="http://trainz.vtsim.com/routes.htm" border="0"><img src="http://www.vtsim.com/image/b_trz_routes_i.png"></a><a href="http://trainz.vtsim.com/others.htm" border="0"><img src="http://www.vtsim.com/image/b_trz_others_i.png"></a><a href="mailto:vasco@vtsim.com" border="0"><img src="http://www.vtsim.com/image/b_email.png"></a><br />
<img src="http://www.vtsim.com/image/sep_800.png">
</p>
</div>
//--- and the menu code ended here
<p align="center">
Contents will display here
<br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
Contents will display here
<br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
Contents will display here
<br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
Contents will display here
<br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
Contents will display here
<br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
Contents will display here
<br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
</p>
</font>
CSS
.fixed {
position:fixed;
width:100%;
top:0;
left:0;
}
JavaScript
$(window).scroll(function () {
if ($(window).scrollTop() > 226) {
$(".header").addClass("fixed");
} else {
$(".header").removeClass("fixed");
}
});