Piccolo Piccolo - 5 months ago 9
HTML Question

I'm an HTML beginner and I need help coding static text

I'm running a server with Apache and I had a question: You know how on some websites there is somethings that stay in place whenever you scroll?

An example of this is on Facebook where it says 'New Event' and it scrolls down with you when you scroll. I was wondering how to do this. I have WAMP installed on the server computer, so if it needs PHP, I can do that. I wasn't really sure of what to use as a search term for this.

Edit: What is this called so I can do a Google search for it?


After playing around with it for quite some time, I eventually found some code that worked for me. I added a some line breaks at the beginning of my website, then added this CSS code to the head:

.navbar {
z-index = 1000;             /*or some large number*/
position: fixed;            /*this makes it scroll down with you*/
width: 100%;                /*the border takes up all the width available*/
height: 40px;               /*and takes up 40 pixels vertically*/

Thanks to everyone who helped me with this!