• Hi,

    I am trying to replace the defaut grey & white border around images with a custom border (actually, a custom background with a frame) that I’ve created in photoshop (a GIF image) for a client’s website.

    I tried adding css tweaks to custom.css, but the background image does not appear. This is what I did:

    I created a CSS class for the image (named it imageborder)and then added the following to custom.css

    .imgborder {
    display: block;
    width:250px;
    height: 250px;
    text-align: center;
    background: http://www.jwconstructionanddesign.com/images/madusas/frameborder.gif (images/madusas/frameborder.gif) no-repeat;
    padding: 2px 0 0 0;
    }

    What am I doing wrong? Is there another way to create a custom background/frame for the image?

    Thanks a lot!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Remove:

    background: http://www.jwconstructionanddesign.com/images/madusas/frameborder.gif (images/madusas/frameborder.gif) no-repeat;

    Add:

    background-color: #000;
    background-image: url('/images/madusas/frameborder.gif') no-repeat;

    Thread Starter ssquare

    (@ssquare)

    Thanks for replying! I tried it, still not working.

    This is what I have in custom.css

    .imageborder {
    display: block;
    width:250;
    height: 250px;
    background-color: #000;
    background-image: http://www.jwconstructionanddesign.com/images/madusas/frameborder.gif (‘images/madusas/frameborder.gif’) no-repeat;
    padding: 2px 0 0 0;
    }

    Could it have something to do with naming the CSS class? I created the css class by clicking on advanced settings for the image and naming it imageborder. Is that the correct way to name the CSS class?

    Anything else that I could try?

    Thanks!

    Thread Starter ssquare

    (@ssquare)

    I’m using the Canvas theme, if that makes any difference.

    I’m sorry but as you are using a non-WPORG theme, you need to seek support from the theme’s developers – paid or otherwise. We only support themes downloaded from wordpress.org here.
    Try http://www.woothemes.com/support/

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Yeah it does. Woothemes don’t handle CSS customisations predictably compared to themed distributed on WordPress.org.

    Talk to your theme’s vendors.

    Thread Starter ssquare

    (@ssquare)

    Thanks for letting me know. I’ll try contacting them.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Replacing image default border with custom border’ is closed to new replies.