ASP.NET, XML, SQL and Javascript tips and tricks

Rounded corners add nice touch to look and feel of a Web Page. User interface that employs rounded corners looks more streamlined, more ergonomic. Often to achieve that effect images are used, but this approach doesn’t allow quick style update and has other issues. Fortunately there is another way:

Let’s take a closer look at the second:
Under magnification it is clearly visible that “round effect” is achieved by 3 layers on top of main div – bottom layer 2 pixel high, middle and top 1 pixel high (and the top’s background color same as main DIV’s border color). Let’s build those layers using specifically styled DIV elements: