CSS HTML Coders saidia hapa

Mi ni beginner in coding. Najaribu kulearn basic html and css. How do i make navigation bar to stay on the top when i select a page kwa the menu ya navigation bar. coz when i click on it it disappears. See my screenshots za codes and what i mean below
when i select news…this is what happens it opens the page but the navigation bar disappears
[ATTACH=full]308744[/ATTACH]this is how my html and css codes inakaa

css files

We use position:fixed to make elements stay at a fixed part of the screen

Use this in your code

.wrapper{ position:fixed; top:0px; }

Edit: Make stackoverflow your friend. 99.9999% of my code is copied from there

Also learn to use inspect using your browser, use it on sites you like to show you how they did it using css or javascript .

How do I click OK through Javascript in this alert box? Inspect element haifiki huku[ATTACH=full]308755[/ATTACH]

this is just a popup box using JS


Thanks. How do I programaticaly click it through JS?

freecodecamp.org…itakusaidia sana

Thanks. But nikiimpliment hiyo the navigation bar remains at the top and becomes unclickable. i cannot open the pages link on the navigation bar menu

Jaribu kuongezeaz-index:50;
uone kama itafanya

good step …lakini jifunze kutumia inspect element na chrome kucheza na css

Asante to all those who have helped OP. @mlipuayote additionally look at this https://devdocs.io/ you can install it on your browser to access it offline. It really helped when I was doing baby steps in HTML/CSS

Idk why you have the to have two elements with the class wrapper if you want to center both sections
you can easily wrap the whole doc

[CODE=css]body{ background:#ccc;}
.wrapper{background:#fff; margin: 0 auto; width:80%; padding :15px; min-height:80%; }


then in the html you can have




you can also read on grid layout and flex box

I always though mi ni guru, leo i had a frontend interview, that is when i have learnt that you always have tobe on your toes. Also make stackoverflow your friend.