dotted border or any border takes up too much space

Discussion in 'CSS' started by roseau, Jul 30, 2007.

  1. #1
    Hello

    I have read and read so many css tutorials and no-one seems to address this so I can't find an answer.

    I made a 2 column template using the css sheet. I run the menu of the site on the right sidebar. I have a background for the whole page and a different background for the content on the left and sidebar on the right so the two meld together.

    Everything looks good until I try to do a border-left with dotted lines on the right sidebar. It seems that a border does not stay inside the container. It pushes the container wider by that many pixels.

    Also, bc it does not stay inside the container, it pulls the background from the page as a whole instead of the background from the sidebar and content sections.

    It looks stupid and it is driving me nuts. Is there a way to fix this simple problem. Have the border inside the sidebar so the dots show up on the correct background.'

    as always, thx so much for the help
     
    roseau, Jul 30, 2007 IP
  2. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #2
    Make the width of the sidebar's width smaller by the width of the border. That should work for a fixed width. You could alternatively make the main column a liquid width. Anything else would require you post your code or a link, so we might see your particular issue.

    cheers,

    gary
     
    kk5st, Jul 30, 2007 IP
  3. soulscratch

    soulscratch Well-Known Member

    Messages:
    964
    Likes Received:
    45
    Best Answers:
    0
    Trophy Points:
    155
    #3
    Yeah, whenever you're designing something like a 500 pixel content area with 1 pixel inner border in Photoshop, never count the borders for the width, so 500 with 1 pixel would be 498 (1px on 2 sides).
     
    soulscratch, Jul 30, 2007 IP