Rounded edges work without corner images?!?!

Last post 06-05-2008 10:24 PM by Cyriacus. 4 replies.

Sort Posts:

  • Rounded edges work without corner images?!?!

    10-28-2007, 7:11 PM
    • Loading...
    • Lunch2000
    • Joined on 01-12-2003, 6:43 PM
    • Posts 54

    I am having a hard time understanding how the rounded corners work on the Fabrikam website.  I originally thought that it was using the corresponding tl.gif (top-left), bl.gif, tr.gif, and br.gif images for the rounding, but I have removed these files and it still works.  So there must me some magic that I don't know about in the style sheets.  Here is the aspx markup in MasterPage.master:

     <div id="nav-main">

    <asp:Menu ID="Menu1" runat="server" DataSourceID="SiteMapDataSource1" Orientation="Horizontal"

    Width="400px" CssClass="menu-main" MaximumDynamicDisplayLevels="0" StaticSelectedStyle-CssClass="StaticSelectedStyle" />

    <div>&nbsp;</div>

    </div>

     

    Now here are the corresponding css elements in the style sheet:

    #nav-main {

    background:#608fc8 url(../../images/bg-nav.png) no-repeat;

    margin-left:auto;

    margin-right:auto;

    width:740px;

    padding:.8em 0 1em 20px;

    position:relative;

    font-weight:bold;

    }

    #nav-main div {

    background:#4b6cb5 url(../../images/bg-nav-side.png) top right no-repeat;

    width:25%;

    _width:25.5%;

    position:absolute;

    top:0;

    right:0;padding:.8em 0 1em 0;

    }

    Can someone please explain to me where the magical rounding takes place, or a link to a site that can explain it to me.  I would greatly appreciate it.  Thanks. 

     

  • Re: Rounded edges work without corner images?!?!

    10-29-2007, 5:21 AM
    • Loading...
    • ca8msm
    • Joined on 11-29-2005, 3:57 PM
    • http://aspnetlibrary.com
    • Posts 2,134

    There are lots of different methods you can use to create rounded corners. Some use javascript, some use images and some use html elements. There is a link to most of these methods here:

    http://www.smileycat.com/miaow/archives/000044.php 

    Mark,
    Join me at the new IT Community of the 21st Century: http://lessthandot.com

    Please remember to click "Mark as Answer" on this post if it helped you
  • Re: Rounded edges work without corner images?!?!

    10-31-2007, 2:20 PM
    • Loading...
    • Knight1219
    • Joined on 08-06-2007, 8:26 PM
    • Florida
    • Posts 46
    can you screenshot and post the edges your talking about?
  • Re: Rounded edges work without corner images?!?!

    11-01-2007, 7:29 PM
    • Loading...
    • Lunch2000
    • Joined on 01-12-2003, 6:43 PM
    • Posts 54

    They are no different than the rounded corners you see in these forum messages.  The link that ca8msm sent is a great resource though and should clear up anyone's questions.

  • Re: Rounded edges work without corner images?!?!

    06-05-2008, 10:24 PM
    • Loading...
    • Cyriacus
    • Joined on 06-08-2007, 8:21 AM
    • Tampa Florida
    • Posts 9

    You pretty much answered your own question.

    Check out this image inside of an image viewer: images/bg-nav.png

    This is in your style sheet

     #nav-main {

    background:#FB83BA url(../../images/bg-nav.png) no-repeat;

    margin-left:auto;

    margin-right:auto;

    width:740px;

    padding:.8em 0 1em 20px;

    position:relative;

    font-weight:bold;

    }

    and the class is called out in your Master Page

    <div id="nav-main">

     

Page 1 of 1 (5 items)
Microsoft Communities
Page view counter