borders & width, height..tell me!

Discussion in 'CSS' started by scutari, Oct 27, 2008.

  1. #1
    I convinced myself that setting a fixed width like:

    width:200px;
    border:1px solid #color;

    makes the width 202px...

    How about you?
     
    scutari, Oct 27, 2008 IP
  2. Dimmo

    Dimmo Well-Known Member

    Messages:
    42
    Likes Received:
    0
    Best Answers:
    1
    Trophy Points:
    126
    #2
    yep, border is added to overall width of div. so it would be 202px
     
    Dimmo, Oct 27, 2008 IP
  3. lopetzi

    lopetzi Peon

    Messages:
    40
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    yes border & padding are added to the width & height
     
    lopetzi, Oct 27, 2008 IP
  4. Sean@WMS

    Sean@WMS Peon

    Messages:
    134
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #4
    You are correct, sir ;)

    The border goes around the div, img, etc. / block, so it adds to its use of space same as a margin would.
     
    Sean@WMS, Oct 27, 2008 IP