I need a header 1 element that stays fixed at the top of the screen and has a relative position. Here are the HTML elements:
<h1 class="sticky">Text goes here</h1>
And here is the CSS:
.sticky {
top: 0;
text-align: center;
position: relative;
position: fixed;
/* I know I cannot add multiple */
/* position properties, so my */
/* question really is what should */
/* I do from here? */
}
For some reason, that doesn't seem to work. I either use sticky, or relative. Is there a fix for this?