This question already has an answer here:
- How to horizontally center a <div>? 90 answers
I'm trying to horizontally center a <div>
block element on a page and have it set to a minimum width. What is the simplest way to do this? I want the <div>
element to be inline with rest of my page. I'll try to draw an example:
page text page text page text page text
page text page text page text page text
-------
| div |
-------
page text page text page text page text
page text page text page text page text
</div>
转载于:https://stackoverflow.com/questions/618097/how-do-you-easily-horizontally-center-a-div-using-css