0
<!DOCTYPE html>
<html>
<head>
<title> Meu teste </title>
<meta charset="utf-8">
<style>
#titulo {
background-color: blue;
position:fixed;
}
</style>
</head>
<body>
<h1 id="titulo"> Meu titulo </h1>
<div id="conteudo">
<p> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse quis velit a libero pretium fringilla in vel eros. Fusce vitae metus sit amet nisi consectetur semper. Duis et sem vitae dolor iaculis eleifend in vel lorem. Morbi egestas blandit turpis, dignissim vulputate metus eleifend non. Phasellus consequat erat eget justo ullamcorper, eu accumsan lacus facilisis. Donec hendrerit non nibh scelerisque aliquam. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nullam posuere massa ac porttitor aliquam. Vivamus tempus nibh mi. Duis eros erat, fringilla vitae ligula quis, mollis laoreet diam. Quisque tempus dolor in risus vehicula interdum. Sed suscipit leo a sagittis pellentesque. Nunc sed vulputate dolor. Proin convallis iaculis condimentum. Suspendisse finibus feugiat nisl sollicitudin dapibus. Nunc euismod, felis ut cursus scelerisque, lectus lorem sollicitudin nunc, vel posuere diam erat eget leo. </p>
</div>
</body>
</html>
I wanted to create a menu that moves together with the page when we navigate the site moving with the mouse, however, when adding position:Fixed the content is within the title. How do I get everything in order, like, the title up there, and the content down there without one going into the other? Which tag do I use?
Have you considered putting
margin-top
in the content element?– Woss