Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create rounded corners on DIV's with CSS and ASP.NET MVC 3

I am trying to create rounded corners on my divs. I am using the standard template in an ASP.NET MVC 3 application.

I have followed this guide:

http://viralpatel.net/blogs/2009/08/rounded-corner-css-without-images.html

basicly you put this in your css file:

#selector {
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
border-radius: 10px;
}

and

<div id="selector">

Why does my site not show rounded corners on my divs? I have tried with Firefox and Chrome.

like image 569
Nanek Avatar asked Jan 20 '26 19:01

Nanek


2 Answers

You forgot to specify a border!

like image 99
Leonard Avatar answered Jan 23 '26 08:01

Leonard


You need to change your CSS to this in order to display the border:

#selector {
    -moz-border-radius: 10px;
    -webkit-border-radius: 10px;
    border-radius: 10px;
    border: 1px solid black;
}
like image 39
Filip Ekberg Avatar answered Jan 23 '26 08:01

Filip Ekberg