|
Of course there are many ways to center something. But I normally put the thing(s) i want to center in a container and set its' horizontal margin to auto. This requires the container to have a limited width though. By default a div stretches horizontally to cover all available area, which means it wouldn't be centered at all. So I either use a fixed width (width:?? px; ) or make it behave like a table (display:table; ) since it will then instead use a minimal width that still makes room for its' contents.
__________________
Your answers will only be as good as your question. Formulate it well and give all the necessary information.
|