FANDOM

1,078,261 Pages
Welcome! Enter your question below. Please use words like "Who, What, Where, When, Why, How, etc..." in your question. Nothing to ask? Click here for a random, un-answered question.

You can use "text-align:center;" for the parent div. For example:

div.box { width:600px; text-align:center; }

will center the image (and text) inside that div.

Use it like this:

<div class="box"> <img src="some_image.jpg" /> </div>

Easier than setting the padding or margin on the image or the outer div.

To vertically align it though, there's no good solution without javascript.

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.