Jump to content

Aligning A List


Mencarta

Recommended Posts

You have to understand the structure of a list. To begin with, the list is a block element. A block element takes up the full width of its container by default.By logic, you can't center something if it's already taking up all the space.If you set its width to something that's less than the width of the parent element, then you can center it by setting the margin to auto. text-align is only used to align inline elements that are children of the block element that you set text-align to.You haven't shown the code of your page, so I'm not sure what other conditions may apply to your list.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...