HTML- How would i go about making a section appear below another section?

Damian

Hi all i've been teaching myself some HTML/CSS/JS and working on codecamp to do so and hit an issue with a tribute page, I feel like this has a relatively simple solution but I've been trying so many different options i've run out of ideas along with me being sleep deprived it is not helping.

My issue: I'm trying to move the section in red below into the green box, but any time I try something to change it, it will move the anchor tag section just over top of the picture, I do not want to make this a footer as i'll be using that later, i still would like this to be part of the body. I've tried using display:block or even the positions from absolute/relative, unless i've been putting them on the wrong areas it's been giving me the same problems. Thank you for taking the time to read all this.enter image description here

header{
  text-align:center;
  border-bottom:5px double;
  font-size:2.5em;
}

body{
  background-color:#efdecd;
}

p{
  font-size:25px;
  font-weight:250;
}

div.picture{
  float:left;
  background-color: #f2f0e6;
  margin-right:5px;
  border-radius: 10px;
}

#image{
  height:72%;
  width:72%;
}

figure{
  margin-left:15px;
  margin-right:-205px;
  margin-bottom:5px;
}
<head>
</head>

<body>
  
  <!-- Title -->
  <header>
    <h1 id="title"> Diogenes of Sinope</h1>
    <p>The cynic philosopher</p>
  </header>
  
  
  <main id="main">
    <!-- Picture w/ caption -->
 <div class=picture id="img-div">   
    <figure>
  <img id="image" src="https://upload.wikimedia.org/wikipedia/commons/thumb/7/7a/Waterhouse-Diogenes.jpg/800px-Waterhouse-Diogenes.jpg" alt="Diogenes" >
   <!-- Caption of picture -->  
  <figcaption id="img-caption">Lorem ipsum dolor sit amet, consectetur elit, incididunt ut labore et dolore magna aliqua.</figcaption>
</figure>
    </div> 
   
    <!-- Body of page -->
    <section id="tribute-info">
      <h2>Timeline of Diogene's Life</h2>
      <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
       <!-- Picture -->
      <iframe width="560" height="315" src="https://www.youtube.com/embed/8EM_cfYcDjY" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen alt="Diogenes video"></iframe>
    </section>
    
   <!-- Anchor tag link --> 
    <section class="links">
      <h2>hello</h2>
      <a id="tribute-link" target="_blank" href="https://www.ancient.eu/article/740/the-life-of-diogenes-of-sinope-in-diogenes-laertiu/">Learn more about Diogenes</a>
    </section>
  </main>
  
</body>

Ffion

You have floated the image, to the left of the page, using float:left. Until you clear this, everything coming after it, will be floated to the left.

You could try adding:

<div class="clearfix"></div> 

in your HTML, between your #tribute-info section and .links section.

Then define .clearfix in your CSS as follows:

.clearfix::after {
    content: "";
    clear: both;
    display: table;
}

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How would I go about making a RewriteRule as described?

From Dev

How Would I go about making a box around the screen using Ncurses

From Dev

How would I go about making three bodies of text side-by-side?

From Dev

How would I go about separating numbers in a string and making them their own values?

From Dev

With Visual Studio SDK, how would I collapse a section of code?

From Dev

How can I get a section of the data present in the format shown below?

From Dev

How can I make my navbar appear at a certain section?

From Dev

Position a section directly below another section with Tachyons CSS

From Dev

How would I go about this? (Chrome extension)

From Dev

How would I go about matching like this

From Dev

How would I go about combining these tables?

From Dev

How would I go about fixing this?

From Dev

Python - How would I go about doing this?

From Dev

How would I go about creating another int() function in Python so I can understand it?

From Dev

Making a Section Match Another Sections Height with CSS

From Dev

Fullpage.js how can I link to another html page with <a> element in section

From Dev

section within an another section

From Dev

How do i put the about section under the header but on top of the footer?

From Dev

how I can do a section in other section?

From Dev

How would I go about aligning x-axis labels with the tick marks they correspond to in HTML?

From Dev

How can i both toggle and go to an id section on the same page

From Dev

How can i both toggle and go to an id section on the same page

From Dev

How to start new section below a floating element

From Dev

How to make a Field Section appear first?

From Dev

Getting a link to go to a specific section on another page

From Dev

small portion of my making my html website- I have a javascript section

From Dev

How would I go about masking specific $_GET variables as subfolders?

From Dev

how would i go about creating a Command Line Interface in javascript?

From Dev

How would I go about loading a JSON file using Laravel?

Related Related

  1. 1

    How would I go about making a RewriteRule as described?

  2. 2

    How Would I go about making a box around the screen using Ncurses

  3. 3

    How would I go about making three bodies of text side-by-side?

  4. 4

    How would I go about separating numbers in a string and making them their own values?

  5. 5

    With Visual Studio SDK, how would I collapse a section of code?

  6. 6

    How can I get a section of the data present in the format shown below?

  7. 7

    How can I make my navbar appear at a certain section?

  8. 8

    Position a section directly below another section with Tachyons CSS

  9. 9

    How would I go about this? (Chrome extension)

  10. 10

    How would I go about matching like this

  11. 11

    How would I go about combining these tables?

  12. 12

    How would I go about fixing this?

  13. 13

    Python - How would I go about doing this?

  14. 14

    How would I go about creating another int() function in Python so I can understand it?

  15. 15

    Making a Section Match Another Sections Height with CSS

  16. 16

    Fullpage.js how can I link to another html page with <a> element in section

  17. 17

    section within an another section

  18. 18

    How do i put the about section under the header but on top of the footer?

  19. 19

    how I can do a section in other section?

  20. 20

    How would I go about aligning x-axis labels with the tick marks they correspond to in HTML?

  21. 21

    How can i both toggle and go to an id section on the same page

  22. 22

    How can i both toggle and go to an id section on the same page

  23. 23

    How to start new section below a floating element

  24. 24

    How to make a Field Section appear first?

  25. 25

    Getting a link to go to a specific section on another page

  26. 26

    small portion of my making my html website- I have a javascript section

  27. 27

    How would I go about masking specific $_GET variables as subfolders?

  28. 28

    how would i go about creating a Command Line Interface in javascript?

  29. 29

    How would I go about loading a JSON file using Laravel?

HotTag

Archive