Home > database >  center a list inside a div not work with common CSS [closed]
center a list inside a div not work with common CSS [closed]

Time:09-22

i have some problem to center and make responsive this div:

Live example: https://example.com/d/179-discussioni-correlate-fase-di-test

after the first post you can see the "RELATED DISCUSSIONS". is not centered and nothing works like

margin: 0 auto;

an help is appreciated

CodePudding user response:

Just add

ul.listOfRelated {
    justify-content: center;
}

CodePudding user response:

You can add display: flex; to the parent div to make the content of the div flexible and add justify-content: center; and align-items:center; to align content vertically and horizontally.

  •  Tags:  
  • css
  • Related