How should I do to put a leaning element at the bottom

A

Anonymous

Guest
Code:
ection {
   border: 1px solid #000;
   height: 100px;
   margin: 20px auto;
   width: 400px;
}

Should read

Code:
section {
   border: 1px solid #000;
   height: 100px;
   margin: 20px auto;
   width: 400px;
}

The <hr> should not be needed.

Since you are using the new html 5 elements, you should be using <footer> and not <p>, along with a correct doctype

Code:
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>My Website</title>
</head>
</body>
<section>
  <h1>The main signboard</h1>
  <p>This is my content</p>
<section>

<footer>
  <p>footer signboard</p>
</footer>
</body>
</html>
 
You have posted in the css part of the forum, that is what you need to learn if you want to adjust the display of your html.

Often it is a better idea to have a bit more content to work with when designing a page layout. By trying to get your footer how you want it first is probably not a good idea.
 
You have six elements in your code:
Code:
html
body
section
h1
hr
& p

You need to learn what your css does otherwise you will constantly be asking for a bit up and bit down a bit left etc.......

Is your site only going to consist of content in h1 and p elements?
 
Back
Top