Search code examples
htmlcsstwitter-bootstrappsd

How to convert PSD to HTML, Bootstrap (tricks)


I have a PSD file where I have the following line:

width: 4px

However, when I add a border like this:

border: 4px solid #000

my browser shows it with an 8px width.

Does my border have it's own paddings?


Solution

  • This is because it adds a border around the div. So there's 4px on top, and 4px on bottom. If you change it to border-top, or border-bottom, it will just be 4px.