Results 1 to 3 of 3

Thread: [CSS]border with rounded corners

  1. #1
    Join Date
    Nov 2007
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default [CSS]border with rounded corners

    Do you see this nice border with rounded corners ? see below


    Code:
    <div style="width: 260px;">
     <b style="font-size:1px;display:block; overflow:hidden;">
      <b style="background:#78AAFF; color: inherit; display:block; overflow:hidden;height:1px;margin:0 5px;"></b>
      <b style="background:#DDDDFF; border-color: #78AAFF; color: inherit; display:block; overflow:hidden;height:1px;border-style: solid; border-width: 0 1px;margin:0 3px; border-width:0 2px;"></b>
      <b style="background:#DDDDFF;border-color: #78AAFF; color: inherit; display:block; overflow:hidden;height:1px;border-style: solid; border-width: 0 1px;margin:0 2px;"></b>
      <b style="background:#DDDDFF;border-color: #78AAFF; color: inherit; display:block; overflow:hidden;border-style: solid; border-width: 0 1px;height:2px; margin:0 1px;"></b>
     </b>
     <div style="background:#DDDDFF; border-color: #78AAFF; color: inherit; display:block; border-style: solid ; border-width: 0 1px;">
      <b style="font-size:1px;display:block; overflow:hidden;height:1px;"></b>
    
    -- YOUR CONTENT GOES HERE --
    
      <b style="font-size:1px;display:block; overflow:hidden;height:1px;"></b>
     </div>
     <b style="font-size:1px;display:block; overflow:hidden;">
      <b style="background:#DDDDFF;border-color: #78AAFF; color: inherit; display:block; overflow:hidden;border-style: solid; border-width: 0 1px;height:2px; margin:0 1px;"></b>
      <b style="background:#DDDDFF;border-color: #78AAFF; color: inherit; display:block; overflow:hidden;height:1px;border-style: solid; border-width: 0 1px;margin:0 2px;"></b>
      <b style="background:#DDDDFF;border-color: #78AAFF; color: inherit; display:block; overflow:hidden;height:1px;border-style: solid; border-width: 0 1px;margin:0 3px; border-width:0 2px;"></b>
      <b style="background:#78AAFF; color: inherit; display:block; overflow:hidden;height:1px;margin:0 5px;"></b>
     </b>
    </div>
    Last edited by jscheuer1; 11-19-2007 at 07:46 AM. Reason: fix title, add code tags

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    This is actually very nice! However, the style should go in the head or in an external stylesheet. Also, some elements of the style are redundant. They should be streamlined.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    I did a little searching on Google and found that the above technique w/proper styling already exists:

    http://www.cssplay.co.uk/boxes/snazzy.html

    http://www.cssplay.co.uk/boxes/chunky.html

    http://www.spiffycorners.com/
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •