Posts Tagged with "css"

CSS rounded corners

Posted by Stanislav Furman on February 26, 2012

Basic approach and main idea

Very often, web designers use CSS rounded corners to make websites nicer. This blog uses rounded corners too. You could use different methods to create rounded corners on your web site, but from my point of view the simplest one of these methods is the method that uses CSS3.

Unfortunately, this method won't work in IE (what a surprise!), but, fortunately, there is a hack exists that can fix this problem.

For most of web browsers the following code will work:


<style>
#container {
  width: 200px;
  height: 200px;
  background-color: #cccccc;	
}
.rounded {
  -moz-border-radius: 10px; /* Works in Firefox */
  -webkit-border-radius: 10px; /* Works in Safari, Chrome */
  border-radius: 10px; /* It's CSS3 */
}
</style>

<div id="container" class="rounded"></div>
Continue reading

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

Posted by Stanislav Furman on February 15, 2012
How to center an item in HTML using CSS.