Posts Tagged with "css"

CSS rounded corners

Posted by Stanislav Furman on February 26, 2012
How to create CSS rounded corners

CSS Centering Trick: How to center a div or an image?

Posted by Stanislav Furman on February 15, 2012

From time to time we create HTML/CSS templates where we need to center a div or an image. For some newbies it poses a problem. In this blog post I'll show you one of the ways of CSS centering.

Suppose you have a div or an image (with the size 150px X 100px) that should be centered on the web page. First step you do is the following CSS:


centered {
  position:  fixed;
  top:  50%;
  left:  50%;
}

CSS Centering Trick (image 1)

Continue reading