Forums

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
    Posts
  • #33763
    pittles78
    Participant

    Hi,

    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:

    http://stores.ebay.com/Tuffy-McPuggles

    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.

    Thanks,
    Jon

    #84370

    Change the padding to margin and your set!

    #84373
    pittles78
    Participant

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

    #84374

    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.