Why is my unordered list getting pushed to the right side?

Kelly Norton

I know next to nothing about HTML, and even less about CSS, and dear lord what I wouldn't give for a WYSIWYG editor that makes this stuff easier!

I simply can't understand why the unordered list I have created does not appear directly underneath the text above it!

enter image description here

I've placed the relevant snippits in jsbin

https://jsbin.com/kebidikozu/edit?html,output

And here is the code in question:

.upper {
  max-height: 100%;
  padding-top: 40px;
  padding-bottom: 170px;
  overflow: auto;
}

.downwarning {
  display: flex;
  justify-content: center;
  margin-top: 5px;
  font-size: 90%;
  color: gray;
}

ul {
  display: table;
  margin: 0 auto;
  list-style-type: disc;
}
<link href="https://cdnjs.cloudflare.com/ajax/libs/flowbite/1.6.5/flowbite.min.css" rel="stylesheet" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/flowbite/1.6.5/flowbite.min.js"></script>
<div class="upper" id="upperid">

<span class="downwarning">this is just some text i right now it really doesnt matter what is says but WHY OH WHY is my haiku UL getting pushed to the right?:
    <br>
    <br>
    <ul>
      <li>It's not DNS</li> 
      <li>There is no way it is DNS</li>
      <li>It was DNS</li>
    </ul>
  </span>

</div>

If anyone can let me know why this format nightmare is happening it would be most appreciated!

Andish

Because you put the <ul> tag inside the <span> tag the list display after the text , if you close the <span> tag and then write <ul> tag, the list appears under the text.

<span class="downwarning">
this is just some text i right now it really doesnt matter what is says but WHY OH WHY is my haiku UL getting pushed to the right?:
</span>
    <br>
    <br>
    <ul>
      <li>It's not DNS</li> 
      <li>There is no way it is DNS</li>
      <li>It was DNS</li>
    </ul>
  

If you don't want to change the html you can remove the display: flex in css.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Getting right side numbers of my Id

Why is the navigation and top section of my site pushed to the right on tablets?

Why is my sidebar getting pushed underneath the main page content? (Again)

Why does my cube bounce at the left side but not at the right side?

Why my unordered lists are floating to the right instead of left?

Why is the second title "Chemicals" stuck on the right in this unordered list format?

Pygame: Some of my sprites are getting stuck on the right side of the screen

The right side of all the text on my website is getting cut off

Text is not getting on right side

why is my unordered_map getting bigger and bigger

Why is my HTML unordered list "list-style-image" not working?

Why is my handle button moving off the timeline on the right side?

Why aren't my pictures placed to the right side of the text?

Why is my mouse pointer keep jumping to the right side of the screen?

Why are there spaces on the left and right hand side of my seekbar?

Why is my Stack clipping the right-hand side of images?

Why is float not moving my log in and signup to the right side of the screen?

Unordered List Alignment - Products Side by Side

Fixed position causes my header to be pushed to the right

Why is my drawing on the right side of the canvas changing the pixels at the left side of my canvas?

Why this li:last-child is not working for my unordered list?

why is my element getting pushed off the page after js injects html?

Bootstrap getting navbar to the right side

Why my SwiftUI List is not getting updated?

Why is my text-align:right isn't aligning the elements to right side

NetSuite: FreeMarker List Getting Pushed Down

Why can't I see the right side of my activity on my phone?

Why is my navbar causing my page to have extra space on the right side?

Why there is space in the right side of the box?