Is there a short hand way to say this?

Discussion in 'CSS' started by Mitchell, May 2, 2010.

  1. #1
    div {border-top: solid 1px #000000; border-bottom: solid 1px #000000;}

    I am trying to say a border on the top and bottom.
     
    Mitchell, May 2, 2010 IP
  2. radiant_luv

    radiant_luv Peon

    Messages:
    1,327
    Likes Received:
    34
    Best Answers:
    1
    Trophy Points:
    0
    #2
    I haven't found just one shorthand to accomplish that. However below can be done

    border:solid #000; border-width:1px 0px;

    if some knows a better shorthand please share with us.

    Thanks
     
    radiant_luv, May 2, 2010 IP
  3. Mitchell

    Mitchell Peon

    Messages:
    204
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks for your reply.

    I was not able to get your suggestion to work.

    The division needs a 1px horizontal border running across the top and the same across the bottom.
     
    Mitchell, May 3, 2010 IP
  4. radiant_luv

    radiant_luv Peon

    Messages:
    1,327
    Likes Received:
    34
    Best Answers:
    1
    Trophy Points:
    0
    #4
    perhaps, this is what i suggested

    <div style="border:solid #000; border-width:1px 0px; width:200px; height:100px;">


    </div>
     
    radiant_luv, May 3, 2010 IP
  5. Mitchell

    Mitchell Peon

    Messages:
    204
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #5
    That seems to have done the trick. It works now, thanks.
     
    Mitchell, May 3, 2010 IP
  6. aprillins

    aprillins Greenhorn

    Messages:
    35
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    16
    #6
    hey nice, I've been looking for this too..
     
    aprillins, May 6, 2010 IP
  7. stoneRide

    stoneRide Peon

    Messages:
    54
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    shortest way i can think

     
    stoneRide, May 9, 2010 IP