• Hello,
    I’d like to add a border to all images as they get posted and to existing pictures (site-wide on posts and pages). I’ve tried adding a short snippet of css code in the ‘css’ area of ‘theme settings’. I tried this: img {
    margin: 5px;
    padding: 10px;
    border: solid black 1px
    }

    The result is that the margin shows up, the padding shows up, but the border doesn’t. I’ve tried using hex code for the colour but that doesn’t work either.

    Do any of you good folk have any ideas? Thanks,
    Rx

    http://wordpress.org/themes/custom-community/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi,

    try the border thing exactly like this, should work 100%:

    border: 1px solid black !important;

    You will have a few images that maybe shouldnt get a border, you will have to give these ones no border with the !important property then..

    Another tip: try just to use the padding better, the margin is handled by classes like alignleft and alignright for example..

    It will look quickly quirky at the end..

    Padding maybe just round 4-6px, add a very slightly different background color than the background, and make the border colored with as less contrast as needed.

    konrad

    Thread Starter filthyrich

    (@filthyrich)

    Thanks for your time Konrad,
    I tried your suggestion, but it still doesn’t show any border.

    I’ve managed to achieve a border by using padding with background: img {
    margin: 7px;
    padding: 5px;
    border-radius: 15px;
    background: #F5E5B3;
    }

    However my issue now is that for some reason when post images are ‘left aligned’, there is a strange anomaly in the way it displays, and it only applies accurately to the top left corner of the image.
    All looks fine with alignement ‘none’, centre’ or ‘right’.

    Only an issue in ‘posts’ not ‘pages’!

    Cheers, Richard.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Theme: Custom Cummunity] adding borders to images’ is closed to new replies.