SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Guru
    Join Date
    Nov 2008
    Posts
    622
    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
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,117
    Mentioned
    448 Post(s)
    Tagged
    8 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

    Forum Usage: Tips on posting code samples, images and more

    Forrest Gump: "IE is like a box of chocolates: you never know what you're gonna get."

  3. #3
    SitePoint Guru
    Join Date
    Nov 2008
    Posts
    622
    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,656
    Mentioned
    15 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
  •