Ask coding questions

← Back to all posts
I'm making a mistake that I can't seem to find.
cuber1515 (91)

Some issue with an HTML element not showing up

So I'm working on a website; right now I'm kind of just working on setting up the pages and stuff (though I've been working on it for a while but had to restart a lot of it because I realized I needed to do other things first and a lot of what I had would be changed so I deleted most of what was on most pages). I was adding back/next buttons to the bottom of the pages and had an issue I put a next button on the bottom of the beginners/white-cross.html section and the button showed up perfectly (on that page the only thing is the header and nav bar), but I put one on the CFOP/cross.html--which is complete except the button because that page wouldn't have to be changed--and it didn't show up. I've been looking for an error forever and can't seem to find it, I also copied and pasted the exact code for the button there and put it on another complete page and it didn't work, and on the none complete pages it works (weird). Can anyone spot the problem.

Code for the button:


<button class="nxt">
  <a href="white-corners.html">Next ==></a>


button {border: none; border-radius: 2px; background-color: rgb(100, 100, 100); padding: 5px; text-align: center; margin-top: 10px; transition: 1s ease;}
button:hover {box-shadow: -8px -8px 0 rgb(180, 180, 180); transform: translateY(8px); transform: translateX(8px);}
button a {text-decoration: none; color: white;}
button a:visited {color: white;}
.bck {position: fixed; left: 10px;}
.nxt {position: fixed; right: 10px;}

Thanks in advanced

Answered by CosmicBear (52) [earned 5 cycles]
View Answer
CosmicBear (52)

Put the code for the button just above the part that says You will probably be able to teach yourself this but if you can't you can use this. but below the actual navbar.

CosmicBear (52)

@cuber1515 it's really weird. Something must be off with the styling or layout.

cuber1515 (91)

@CosmicBear interesting. That worked, so it must be something in the code underneath that, that's causing it.

cuber1515 (91)

@CosmicBear ok now that you point that out I realized I probably shouldn't use position: fixed. I think it might have something to do with that. IDK though, bc that'd be weird. I'll check that though and see.

cuber1515 (91)

@CosmicBear Thanks for pointing that out. I realized I should of used position: relative not position: fixed (I don't actually know why I had it position fixed in the first place but what ever)