1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.4 Add border to all attached images

Discussion in 'Styling and Customization Questions' started by rwm1962, May 23, 2015.

  1. rwm1962

    rwm1962 Active Member

    I'm hoping someone can help me with some extra CSS to add a 1px border to all images in posts.

    Thanks in advance!
     
    creativeforge likes this.
  2. AndyB

    AndyB Well-Known Member

    Add this to your EXTRA.css template:

    Code:
    .bbCodeImage {
        border:thin solid #333;
    }
    
     
    creativeforge likes this.
  3. rwm1962

    rwm1962 Active Member

    Perfect, Thanks!
     
  4. rwm1962

    rwm1962 Active Member

    Is there any way this can exclude images in signatures?
     
    creativeforge likes this.
  5. Dylan V

    Dylan V Well-Known Member

    Hi,

    Yes, add this in "EXTRA.css" template:
    Code:
    .signature .bbCodeImage
    {
        border: none;
    }
     
    creativeforge and rwm1962 like this.
  6. rwm1962

    rwm1962 Active Member

    Many thanks Dylan
     
  7. rwm1962

    rwm1962 Active Member

    Another refinement required - can gifs be exluded?

    To explain - on our theme regular images in posts look better with a border.
    We have a lot of transparent gifs in articles & they look better without a border.
     
  8. creativeforge

    creativeforge Active Member

    BTW, if you need to add padding so the border isn't against the image, you can do this:

    Code:
    .bbCodeImage {
        border:thin solid #333;
        padding: 8px;
        }
     

Share This Page