Copy link to clipboard
Copied
Hey guys,
I've got a huge problem with my template in dreamweaver. I know how to add a editable div but my problem is that every page content is different.
What i mean is that on one page (if you add the text) you have to scroll down very long but on the other page there isn't much content and you don't have to scroll.
Now i'm facing two problems:
I hope you can help me or send me a link to a tutorial or something like that. I did a lot of research and found nothing...
Thanks in advance,
Petus
Hi,
For a website where the footer must rest at the bottom of the page, even if the content above it is too short to push it to the bottom of the viewport naturally. However, if the content is taller than the user’s viewport, then the footer should disappear from view as it would normally, resting at the bottom of the page (not fixed to the viewport).
If you know the height of the footer, then you should set it explicitly, and set the bottom padding of the footer’s parent element to be the same va
...Copy link to clipboard
Copied
Have a look here Sticky Footer, Five Ways | CSS-Tricks
Edit:
Grid, the last example, is not supported at the moment. In other words, do not use.
Copy link to clipboard
Copied
Is this the kind of structure you are looking for?
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Untitled Document</title>
<style>
body {
margin: 0;
}
footer {
position: fixed;
bottom: 0;
width: 100%;
background-color: #000;
}
footer h3 {
color: #fff;
}
</style>
</head>
<body>
<div class="page_content">
<h1>Contents</h1>
<p>Text content goes here. Text content goes here</p>
<p>Text content goes here. Text content goes here</p>
<p>Text content goes here. Text content goes here</p>
<p>Text content goes here. Text content goes here</p>
<p>Text content goes here. Text content goes here</p>
<p>Text content goes here. Text content goes here</p>
<p>Text content goes here. Text content goes here</p>
<p>Text content goes here. Text content goes here</p>
<p>Text content goes here. Text content goes here</p>
<p>Text content goes here. Text content goes here</p>
<p>Text content goes here. Text content goes here</p>
<p>Text content goes here. Text content goes here</p>
<p>Text content goes here. Text content goes here</p>
<p>Text content goes here. Text content goes here</p>
<p>Text content goes here. Text content goes here</p>
<p>Text content goes here. Text content goes here</p>
<p>Text content goes here. Text content goes here</p>
<p>Text content goes here. Text content goes here</p>
<p>Text content goes here. Text content goes here</p>
<p>Text content goes here. Text content goes here</p>
<p>Text content goes here. Text content goes here</p>
<p>Text content goes here. Text content goes here</p>
<p>Text content goes here. Text content goes here</p>
<p>Text content goes here. Text content goes here</p>
<p>Text content goes here. Text content goes here</p>
<p>Text content goes here. Text content goes here</p>
<p>Text content goes here. Text content goes here</p>
<p>Text content goes here. Text content goes here</p>
<p>Text content goes here. Text content goes here</p>
<p>Text content goes here. Text content goes here</p>
<p>Text content goes here. Text content goes here</p>
<p>Text content goes here. Text content goes here</p>
</div>
<!-- end page_content -->
<footer>
<h3>Footer content goes here.</h3>
</footer>
<!-- end footer -->
</body>
</html>
Copy link to clipboard
Copied
Hi,
For a website where the footer must rest at the bottom of the page, even if the content above it is too short to push it to the bottom of the viewport naturally. However, if the content is taller than the user’s viewport, then the footer should disappear from view as it would normally, resting at the bottom of the page (not fixed to the viewport).
If you know the height of the footer, then you should set it explicitly, and set the bottom padding of the footer’s parent element to be the same value (or larger if you want some spacing).
This is to prevent the footer from overlapping the content above it, since it is being removed from the document flow with position: absolute;.
The CSS footer style can be something as below-
.footer {
position: absolute;
right: 0;
bottom: 0;
left: 0;
padding: 1rem;
}
This way the footer will always be positioned at the bottom of the page, but not fixed!
Regards,
Niharika Gupta
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more