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!
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!
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.
Comments