Tag Archives: web design

CSS & HTML Centering Stuff

In this post called “CSS & HTML Centering Stuff” I will explain how you can easily center text, images and other items in HTML and CSS.

So let’s begin with the text:

/*    This will center the text    */
p {
    text-align: center;
}
/*    This is also an option inside any class    */
.some-class {
    text-align: center;
}

Now let’s center an image or a complete block: Read more [...]