Tag Archives: css centering

CSS Centering : text, inline & block elements

Inline & Block elements >> Centering HTML elements

In this article I have describe which HTML elements are inline elements and which are block level HTML5 elements. How to center inline elements inside a container DIV or block level elements.

Centering text & inline elements

IMG, STRONG, SPAN elements in a webpage are examples of inline elements. Alos I have used the term inline content, which means inline elements. Inline content includes such things as text, images, <strong> and <span> tags. Now we need to center inline content inside a block element (Normally Inline elements resides inside a BLOCK element like DIV, H1 etc)

Just use text-align property applied to the next higher level block level container with the content to be aligned inside. Continue reading CSS Centering : text, inline & block elements