CSS Rounded Corners

Rounding All Corners of an Element:

Basic rounded corners (all corners of the element will be rounded):

 

#example {
      -moz-border-radius: 15px;          //Mozilla tag
      border-radius: 15px;                   //Standard tag for all browsers
   }

 

Targeting Specific Corners:

Both W3C and Mozilla specifications are given.  Both will need to be listed for the rounded corners to be seen in all browsers.

 

W3C Mozilla
border-radius -moz-border-radius
border-top-left-radius -moz-border-radius-topleft
border-top-right-radius -moz-border-radius-topright
border-bottom-right-radius -moz-border-radius-bottomright
border-bottom-left-radius -moz-border-radius-bottomleft

 

#example {
      -moz-border-radius-topleft: 15px;          //Mozilla tag
      border-top-left-radius: 15px;                 //Standard tag for all browsers
   }

 


 




Related Posts


Fixed Position Div Isn't Staying Fixed When Scrolling on Android

My nice fixed position toolbar wasn't sticking as it should as I scrolled through on my mobile browser window...
Read Post

Simple Sticky Element

The user scrolls down the page and once the scrolling reaches the top of an element of my choosing, that element sticks to the top of the window, so it's always visible from that point on...
Read Post

Chrome displays a different height than what Chrome says the height should be.

I was changing the height of an element, but no matter where I specified the height, it wasn't displaying what I was putting in
Read Post

A Nicer Select Dropdown

Better select boxes are all over the internet, but I actually couldn't find one that I liked, and that worked for what I needed...
Read Post