How to generate <ul> list and center <ul> list to specified margins

How to generate <ul> list and center <ul> list to specified margins
0

#1

Hi there,

I have just started my first Free Code Camp Web Project

I ave to gebnerate this webpage using codepen:

https://codepen.io/freeCodeCamp/full/NNvBQW

Here is my pen so far:
https://codepen.io/theoask/pen/ZJvmLM

However I am stuck when I need to center an HTML unordered list (the main text with dates).

I can generate a list in HTML and center it, however in this exercie I have to specifiy specific margins left and right, and this is where I am stuck.

Also I don’t know how to embed an image description.

Otherwise I’m getting the bang of it so far and feel pretty comfortable thanks to my previous HTML knowledge, but I need to work more.

Also I wonder if there would be an alternative wa to generate this list rather than having to list each individual lines many times?

I though about coding in Javascript an array, entering the text into the array with an index for each new line and generate the individual lines in a FOR loop , incrementing the index +1 until the end.

But it sounds more complex.


#3

Looks like you already figured how to center ul list.

One tip to give you is you can apply this css style to remove those unnecessary bullet points in the list.

ul {
  list-style: none;
}