Search code examples
htmlcssjquery-mobile

Rounded corners for navbar?


For example, I can use this

 -webkit-border-radius: 30px

To give the HTML5 element, such as a button, a round corner instead of a normal angular corner

Can I do the same for navbar?

The below is awesome but I am just curious if I can give the round corners to a navbar. If not then it is ok it is not overwhelmingly important

<div data-role="navbar">
<ul>
    <li> <a href="#" class="ui-btn-active" id=viewtherecent> Recent </a> </li>
    <li> <a href="#" id=viewthefrequency> Frequent </a> </li>
</ul>
</div> <!-- /navbar -->

Solution

  • Im not sure if you mean the buttons in the navbar or the Navbar itself so i provided 2 demos.

    Demo rounded buttons

    http://jsfiddle.net/r10tjkuz/

    enter image description here

    CSS

     .nav-border {
        border-radius: 30px;    
        }
    

    Demo rounded Navbar

    http://jsfiddle.net/6y1294rv/

    enter image description here

    CSS

      .nav-bordera {
        border-top-left-radius:30px;
        border-bottom-left-radius:30px;   
        }
    
        .nav-borderb {
        border-top-right-radius:30px;
        border-bottom-right-radius:30px;  
        }