The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript How do I apply a border to an image w/o it encapsulating the padding too?

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #33763


    I have a block of images that I want to add a 1px solid #CCCCCC border to, but I have a padding: 10px 10px 0 0; and when I add the border to the image class it goes around the padding too. Here is a link to what I need to modify:

    Some of the images appear to have borders, but they were done in Illustrator and it seems like a waste of time when a CSS class could do the same thing easier.



    Change the padding to margin and your set!


    Thanks again! That was so simple. I can stop pulling my hair out now.


    Padding sits inside the border and margin outside of it. Once you understand that it is easy!

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.