SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: css shorthand for 4 sided different colour border

  1. #1
    SitePoint Evangelist
    Join Date
    Nov 2008
    Posts
    595
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    css shorthand for 4 sided different colour border

    hi all

    like there is padding shorthand
    Code:
    padding:10px 5px 15px 20px;
    I would like to know if there is any shorthand code for 4 sided border of different colours ?

    Code:
    border-left:1px solid #ff0000
    border-right:1px solid #ffff00
    border-bottom:1px solid #ff00ff
    border-top:1px solid #fff0ff
    vineet

  2. #2
    It's all Geek to me silver trophybronze trophy
    SitePoint Award Recipient ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, Australia
    Posts
    20,310
    Mentioned
    225 Post(s)
    Tagged
    3 Thread(s)
    Try this:

    Code:
    border-width: 1px;
    border-style: solid;
    border-color: #fff0ff #ffff00 #ff00ff #ff0000;
    Facebook | Google+ | Twitter | Web Design Tips | Free Contact Form

    Try your hand at the new JavaScript Challenge!

    If you don't like getting your feet stuck in a bog, avoid Twitter BootsTrap.

  3. #3
    SitePoint Evangelist
    Join Date
    Nov 2008
    Posts
    595
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    thanks ralph

    it will work as needed

    vineet

  4. #4
    SitePoint Wizard bronze trophy PicnicTutorials's Avatar
    Join Date
    Dec 2007
    Location
    Carlsbad, California, United States
    Posts
    3,386
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)
    Or

    border: 1px solid #000;
    border-color: #fff0ff #ffff00 #ff00ff #ff0000;

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
  •