• Resolved Wimbledon

    (@wimbledon)


    Hello everyone,

    For a PNG image with transparency, placed in the WordPress HTML editor, is there a way to place a tag around the code so that the transparent portions are NOT automatically filled in by WordPress?

    If I am understanding my problem correctly, WordPress is automatically filling in my PNG images placed in the middle of pages.

    I am trying to place PNG images onto my WordPress page, without a border, and with transparent areas still transparent.

    I have removed the border around JPEGs and PNGs with this code:

    CSS insert:

    /* Optional images with no borders */
    .customImage img {
    padding: 0px;
    border: none;
    -moz-border-radius: 0px;
    -khtml-border-radius: 0px;
    -webkit-border-radius: 0px;
    border-radius: 0px;
    }

    And I use it like this when I don’t want a border:

    <div class=”customImage”>
    — JPG or PNG image code here —
    </div>

    So I can remove the border around the PNG, but not retain the transparency.

    You can see my page here to illustrate:
    http://roadreview.net/roads/united-states/california/latigo-canyon/

    How do I insert a PNG image and retain the transparency?

    Thank you very much for your time, I appreciate it.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello

    The problem is these settings, seen on line 74 in your view source. this likely comes from the theme’s control panel.

    .post img {
    background-color:#F3F3F3;
    border:1px solid #DDDDDD;
    }

    just add ‘background-color:transparent;’ to your .customImage img style.

    Thread Starter Wimbledon

    (@wimbledon)

    Thank you both for your help, my problem is now solved.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Inserting PNGs and retaining transparency’ is closed to new replies.