2 questions. First, how do I make a top nav bar? I want the nav bar to stay there even when I scroll. Second, why is the tic tac toe and the pokemon battle unaligned?
For your navigation bar, I believe that you'd want
position: sticky, not
Pretty sure that it exists for navbars like this :/
- make ur nav
- first change your HTML
<div style="overflow: hidden"> <article> <h3> <a href="https://replit.com/@WilliamXing/Pokemon-Battle#main.py" target="_blank">Pokemon Battle</a> </h3> <img src="Pokemon.jpg" height="200px" width="250px"> <p>The world of pokemon is awesome. There are so many pokemon. In this game, you get to battle with other trainers(the computer), and win/lose. There is a shop in the end, where you can buy stuff</p> </article> <article> <h3> <a href="https://replit.com/@WilliamXing/Tic-Tac-Toe#main.py" target="_self">Tic Tac Toe</a> </h3> <img src="tic tac toe.jpeg" height="200px" width="250px" class="pokemonImg"> <p>This game was made using tkinter. Tkinter is a python "graphics" module that allows you to make pictures and stuff. It's colors are nice.</p> </article> </div>
second, add this to your
float left makes it well, align left automagically.
overflow hidden is used to make sure that the divs take up space too.
1. use bootstrap or make your own with
float:top; and some other css tricks. search it up!
float: left; in style.css to both of the
<article>s via a class to make them on the same height!