SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Wizard trampt's Avatar
    Join Date
    Jan 2003
    Location
    Newport, RI
    Posts
    1,997
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    applying a border to just right and bottom?

    I'm just wondering what is the short hand way in CSS to specifiy a 1px border of a certain color on the right and bottom of a cell?

  2. #2
    SitePoint Wizard megamanXplosion's Avatar
    Join Date
    Jan 2004
    Location
    Kentucky, USA
    Posts
    1,099
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    border: 1px Solid #000;
    border-width: 0 1px 1px 0;
    The border-width property (or any shorthand CSS property that effects the sides of an element) goes TOP, RIGHT, BOTTOM, LEFT. Hope this helps

  3. #3
    Misfit
    Join Date
    Apr 2000
    Location
    Pennsylvania, USA
    Posts
    2,266
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by megamanXplosion
    Code:
    border: 1px Solid #000;
    border-width: 0 1px 1px 0;
    The border-width property (or any shorthand CSS property that effects the sides of an element) goes TOP, RIGHT, BOTTOM, LEFT. Hope this helps
    A way to remember that is the word "TRouBLe," as Eric Meyer suggests in Cascading Style Sheets: The Definitive Guide. It helps me to remember at least.

  4. #4
    SitePoint Wizard trampt's Avatar
    Join Date
    Jan 2003
    Location
    Newport, RI
    Posts
    1,997
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    so in my external style sheet.

    .shadow { border: 1px Solid #969693; border-width: 0 1px 1px 0; }

    then <td class="shadow"> should work fine in most browsers?

    **** EDIT - Works great ... thanks guys.

  5. #5
    SitePoint Wizard megamanXplosion's Avatar
    Join Date
    Jan 2004
    Location
    Kentucky, USA
    Posts
    1,099
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Justin S
    A way to remember that is the word "TRouBLe," as Eric Meyer suggests in Cascading Style Sheets: The Definitive Guide. It helps me to remember at least.
    I just think "clock-wise"

  6. #6
    SitePoint Wizard trampt's Avatar
    Join Date
    Jan 2003
    Location
    Newport, RI
    Posts
    1,997
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by megamanXplosion
    I just think "clock-wise"
    That does seem easier.

  7. #7
    Non-Member Egor's Avatar
    Join Date
    Jan 2004
    Location
    Melbourne, Australia
    Posts
    7,305
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by megamanXplosion
    I just think "clock-wise"
    Me too!


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
  •