This is the way I set up a list where the disc markers are inside the main bounding box and the text wrappers underneath itself inside of the disc marker
<div class="example">
<ul>
<li>
Alfa Bravo Charlie
</li>
<li>
Hang tinsel from both branches.
Heave the line over the port side.
Help the weak to preserve their strength.
</li>
</ul>
</div>
<div id="remove_list_style_type" class="example">
<ul>
<li>
Delta Echo Foxtrot
</li>
<li>
Send the stuff in a thick paper bag.
Set the piece here and say nothing.
</li>
</ul>
</div>
#remove_list_style_type {
> ul {
list-style: none;
}
}
(it looks like outside is the default?)
<div id="inside_style" class="example">
<ul>
<li>
Send the stuff in a thick paper bag.
Set the piece here and say nothing.
</li>
<li>Delta Echo Foxtrot</li>
</ul>
</div>
#inside_style {
> ul {
list-style: inside;
}
}
If markers/bullets are set to "outside" which I think is the default, they'll be outside the <ul> area. You could move them back in with `list-style: inside`` or remove them with `list-style: none``;
<div id="zero_margin_pad" class="example">
<ul>
<li>
Send the stuff in a thick paper bag.
Set the piece here and say nothing.
</li>
<li>Delta Echo Foxtrot</li>
</ul>
</div>
#zero_margin_pad {
> ul {
padding-left: 0;
margin-left: 0;
}
}
<div id="zeroed_no_bullets" class="example">
<ul>
<li>
Send the stuff in a thick paper bag.
Set the piece here and say nothing.
</li>
<li>Delta Echo Foxtrot</li>
</ul>
</div>
#zeroed_no_bullets {
> ul {
padding-left: 0;
margin-left: 0;
list-style: none;
}
}
This page is designed to make what's happening with the css as clear as possible. To help with that, there are no other positioning styles on this page other than those above and this set here:
*, *::before, *::after {
box-sizing: border-box;
}
* {
margin: 0;
}
.example {
width: min(100% - 4rem, 50ch);
margin-top: 2rem;
margin-bottom: 2rem;
background-color: #211;
}
.h2Section {
border-top: 1px solid blue;
padding-top: 0.7rem;
margin-top: 2rem;
margin-bottom: 2rem;
}
.htmlSection {
padding-left: 2rem;
}