first html file (index.html)
<html>
<head>
<link rel="stylesheet" href="style.css">
</head>
<body>
<header>What every country was equipped with in WW2</header>
<p class="Country"> AMERICA </p>
<div id="US_Soldier">
<div>
<p> During ww2, american soldiers were provided with some personal belongings and basic rations along with their main equipment. Their ammunition belt held 8 clips of ammunition. They also had a first aid pouch, a bayonet, a canteen, and some other tools. Spades, a basic helmet, and a raincoat/tent pack. The standard gun was an m1 garand.
</p>
</div>
<div>
<img class = "images" style="width:150px" src="americansoldier.jpg">
</div>
</div>
<br>
<div id = "US_Branches">
<div>
<p> Along with their actual soldier equipment, America had different branches for different parts of war. Mainly, this was divided into the army, the marines, and the navy to name a few.
</p>
</div>
<div>
<img style="width:150px" src="americanfighterjet.jpeg">
</div>
</div>
<div id = "US_Tanks">
<div>
<p>
One of the main tanks was the m4 sherman. Its armour thickness had a maximum of 75 mm and a minimum of 12 mm. It weighed about 60,000 pounds, had a max speed of 30 mph, and had a range of 120 miles.
</p>
</div>
<div>
<img style="width: 150px" src="americantank.jpg">
</div>
</div>
<div id = "navbar">
<ul>
<li><a class = "nav" href="index.html">America</a></li>
<li><a class = "nav" href="germany.html">Germany</a></li>
<li><a class = "nav" href="#">Japan</a></li>
</ul>
</div>
</body>
</html>
second html file (germany.html)
<html>
<head>
<link rel="stylesheet" href="style.css">
</head>
<body>
<header>What every country was equipped with in WW2</header>
<p class="Country"> AMERICA </p>
<div id="US_Soldier">
<div>
<p> During ww2, american soldiers were provided with some personal belongings and basic rations along with their main equipment. Their ammunition belt held 8 clips of ammunition. They also had a first aid pouch, a bayonet, a canteen, and some other tools. Spades, a basic helmet, and a raincoat/tent pack. The standard gun was an m1 garand.
</p>
</div>
<div>
<img class = "images" style="width:150px" src="americansoldier.jpg">
</div>
</div>
<br>
<div id = "US_Branches">
<div>
<p> Along with their actual soldier equipment, America had different branches for different parts of war. Mainly, this was divided into the army, the marines, and the navy to name a few.
</p>
</div>
<div>
<img style="width:150px" src="americanfighterjet.jpeg">
</div>
</div>
<div id = "US_Tanks">
<div>
<p>
One of the main tanks was the m4 sherman. Its armour thickness had a maximum of 75 mm and a minimum of 12 mm. It weighed about 60,000 pounds, had a max speed of 30 mph, and had a range of 120 miles.
</p>
</div>
<div>
<img style="width: 150px" src="americantank.jpg">
</div>
</div>
<div id = "navbar">
<ul>
<li><a class = "nav" href="index.html">America</a></li>
<li><a class = "nav" href="germany.html">Germany</a></li>
<li><a class = "nav" href="#">Japan</a></li>
</ul>
</div>
</body>
</html>
style sheet
@font-face {
font-family: Warpaint;
src: url('Warpaint.ttf');
}
body {
background-image:linear-gradient(#181a19,#272b29);
}
p {
color: #98a39d;
font-family: Warpaint;
}
h3 {
font-family: Warpaint;
font-size: 30px;
}
header {
font-size: 35px;
font-family: Warpaint;
color:#98a39d;
text-align: center;
margin: 0 auto;
}
.Country {
text-align: center;
font-size: 50px;
margin: 0 auto;
}
#US_Soldier {
margin: 0 auto;
display: flex;
width: 450px;
border-radius: 25px;
}
#US_Soldier > div {
margin: 10px;
}
#US_Branches {
margin: 0 auto;
display: flex;
width: 450px;
}
#US_Branches > div {
margin: 10px;
}
#US_Tanks {
margin: 0 auto;
display: flex;
width: 450px;
}
#US_Tanks > div {
margin: 10px;
}
#navbar {
text-align: center;
}
#navbar > ul {
margin: 0;
padding: 0;
list-style: none;
}
#navbar > ul > li {
display: inline-block;
margin-left: 60px;
padding-top: 25px;
}
#navbar > ul > li > a {
font-family: Warpaint;
font-size: 25px;
text-decoration: none;
text-transform: uppercase;
}
.nav {
font-size: 72px;
color: #98a39d;
}
.nav:hover {
color: #6b736e;
}
The issue is that the stylesheet works on first try, but then when I click on one of the href buttons, it removes the styling for it. The actual linking works because when i click on the germany button, it takes me to the page with "germany" on it.