Solution 1 :

It is not clear if there is something else in the css code or a css framework that applies rules to the ul, li or other elements that affects the default broswer behaviour. Therefore it is rather difficult to reproduce the behaviour we see in the images, since we don’t know what is really happening to these elements.

Usually the browser apply some left margin or padding to the ul element, to indent it from the other previous and following contents.

From your images, it looks like there is some rules applied to ul that “reset” these values to obtain some kind of horizontal alignment of the text to the other contents, thus putting the list item marker outside of the container box. This is a very used technique: setting margin-left: 0; padding-left: 0; to ul elements.

If you are in this situation, a possible solution would be to set padding-left: 1.0em; to the ul item. The value of 1.0em or 1.25em should be enough to scale with the font size.

Unfortunately, I was not able to reproduce the vertical disalignment between the marker and the text using list-style-position: inside;, so I have no clue what might be the cause.

However, I would note that list-style-position: outside; keep the indentation with multiline contents, whereas inside does not. This might not be your case, if you have very short text items, but it is worth noting.

This is an example with my suggestion. I put a red dotted border on the list item to show the different behaviour between outside and inside marker.

.content {
  text-align: justify;
}

.content ul {
  margin-left: 0;
  padding-left: 0;
}

.content-outside ul {
  padding-left: 1.0em;
}

.content-inside ul {
  list-style-position: inside;
}

li {
  border: 1px dotted red;
}
  <div>
    Folgende Inhalte wurden vermittelt <strong>(Browser defaults)</strong>:
    <ul>
      <li>Sequi sed et nobis vel sit.</li>
      <li>Voluptatum vitae perspiciatis non ut delectus ab illo nisi.</li>
      <li>(Very long content that should span on multiple lines) Voluptatum vitae perspiciatis non ut delectus ab illo Voluptatum vitae perspiciatis non ut delectus ab illo Voluptatum vitae perspiciatis non ut delectus ab illo Voluptatum vitae perspiciatis non ut delectus ab illo Voluptatum vitae perspiciatis non ut delectus ab illo Voluptatum vitae perspiciatis non ut delectus ab illo nisi.</li>
    </ul>
  </div>
  <br>
  <div class="content content-outside">
    Folgende Inhalte wurden vermittelt <strong>(marker outside)</strong>:
    <ul>
      <li>Sequi sed et nobis vel sit.</li>
      <li>Voluptatum vitae perspiciatis non ut delectus ab illo nisi.</li>
      <li>(Very long content that should span on multiple lines) Voluptatum vitae perspiciatis non ut delectus ab illo Voluptatum vitae perspiciatis non ut delectus ab illo Voluptatum vitae perspiciatis non ut delectus ab illo Voluptatum vitae perspiciatis non ut delectus ab illo Voluptatum vitae perspiciatis non ut delectus ab illo Voluptatum vitae perspiciatis non ut delectus ab illo nisi.</li>
    </ul>
  </div>
  <br>
  <div class="content content-inside">
    Folgende Inhalte wurden vermittelt <strong>(marker inside)</strong>:
    <ul>
      <li>Sequi sed et nobis vel sit.</li>
      <li>Voluptatum vitae perspiciatis non ut delectus ab illo nisi.</li>
      <li>(Very long content that should span on multiple lines) Voluptatum vitae perspiciatis non ut delectus ab illo Voluptatum vitae perspiciatis non ut delectus ab illo Voluptatum vitae perspiciatis non ut delectus ab illo Voluptatum vitae perspiciatis non ut delectus ab illo Voluptatum vitae perspiciatis non ut delectus ab illo Voluptatum vitae perspiciatis non ut delectus ab illo nisi.</li>
    </ul>
  </div>

Solution 2 :

you can try this approach. If it doesnt work you can set the padding-inline-start as 0 then use other method like :before

.body {
        margin-top: -1em;
        padding-top: 0;
        padding-left: 3em;
        padding-right: 2em;
     }


.content {
         text-align: justify left;
    }
    
        
ul {padding-inline-start: 18px;}
<html>

<head>

</head>

<body>
  <div class=content>
    Folgende Inhalte wurden vermittelt:
    <ul>
      <li>Sequi sed et nobis vel sit.</li>
      <li> Voluptatum vitae perspiciatis non ut delectus ab illo nisi.</li>
    </ul>
  </div>

</body>

</html>

Problem :

I am facing a problem while aligning the list items. Using CSS property list-style-position: inside;

Normally the bullet is outside of the text. Such as

list-style-position: inside;

Which doesn’t align with rest of the page’s content. I want bullets to come directly under upper line

Folgende Veranstaltung absolviert hat:

To achieve that, I used the CSS property list-style-position: inside; to move the bullets inside the text, it does change the position of the bullets inside but the items(text) doesn’t align properly in front of the bullets instead they moved little down.
enter image description here

I cannot use the padding-left property here, because that would also move the upper line with the list of items. On other hand, I could separate the list from the upper line in different containers to apply that padding property but I don’t think that would be a good solution. All the content is coming as one value from he database.

Content looks like this:

<html>

<head>

</head>

<body>
  <div class=content>
    Folgende Inhalte wurden vermittelt:
    <ul>
      <li>Sequi sed et nobis vel sit.</li>
      <li> Voluptatum vitae perspiciatis non ut delectus ab illo nisi.</li>
    </ul>
  </div>

</body>

</html>

Here is the CSS code:

     .body {
        margin-top: -1em;
        padding-top: 0;
        padding-left: 3em;
        padding-right: 2em;
     }


    .content {
         list-style-position: inside;
         text-align: justify left;
    }

I found few resources over the forum but those doesnt solve my problem,
Any suggestions how can I achieve that with CSS?

Comments

Comment posted by here

Please, insert the HTML code, not the image: this can help others reproduce your situation, amonst other reasons explained

Comment posted by A Haworth

Where is your ul tag in relation to that top line of text?

Comment posted by Sniper

@AHaworth its after the line. I just edited the post.

Comment posted by Crystal

Am I understanding this right, you want all of them to be align on the left side? If that so let me know.

Comment posted by A Haworth

Your code snippet does not show the same layout as your image, please check and ensure there is enough CSS in there to get a match.

Comment posted by Sniper

Your assumptions were absolutely correct. Setting

By