Round corners in grid issue.

Hi, I'm trying to add round corners to a gridview using the CSS below. It works fine in IE11 but not in chrome. In Chrome, the border just grows as the page maximizes as the picture below.

At first, it behaved the same in IE but after adding the line  "style="display: table;" worked fine. But as I said, still not good in chrome. Any ideas?

Thanks!

  <div class="rounded-corners" style="display: table;" runat="server">
     <asp:GridView ID="gv" runat="server" AutoGenerateColumns="false" CssClass="mygrid">
....

Open in new window


 .mygrid
{
    border: 1px solid steelblue;
    -moz-border-radius: 5px;
    -webkit-border-radius: 5px;
    border-radius: 6px;
    background-color: White;
    font-family: Verdana;
    font-size: 10pt;
    margin-bottom: 0px;
    
   
}
...

 .rounded-corners
{
       border: 1px solid steelblue;
      -webkit-border-radius: 6px;
      -moz-border-radius: 6px;
      border-radius: 6px;
      overflow: hidden;
  
}

Open in new window

grid
Adrian CrossAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Chinmay PatelChief Technical NinjaCommented:
Hi Adrian,

I just created a fiddle with your HTML as source at : http://jsfiddle.net/xpvt214o/739702/
Please check if it is working as expected. I suspect ASP.Net's default grid generation might be affecting this. Are you applying any grid template?

Regards,
Chinmay.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Adrian CrossAuthor Commented:
Many thanks for taking your time putting that together. I just realised I had another div wrapping the border with some bootstrap class which it was causing this. Removing that div, solved the problem.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.