Okay
  Public Ticket #1028087
Custom Content Grid Item img height wrong
Closed

Comments

  •  2
    petav started the conversation

    I tried to make Custom Content Grid Item from an image plus some text. The image is 300x163 (a logo). Sadly, salient theme streches the img height. What's more irritating, the debugger shows the code sets the img height explicitly to 349px (probably from a wrong js. event) (this is nowhere in our content) :

    <img class="aligncenter size-medium wp-image-6354" src="xxxxx/wp-content/uploads/tp-link_Logo_RGB-300x163.jpg" alt="" style="height: 349px; transform: matrix(1.005, 0, 0, 1.005, 0, 0);" "width="300" height="163" />

    How can i make the image display correctly?

  •  8,998
    Tahir replied

    Hey,

    Please provide the page url so that i can write up the custom css for whats possible.

    Thanks


    ThemeNectar Support Team 

  •   petav replied privately
  •  8,998
    Tahir replied

    Add this into the Custom CSS box located in your Salient Options panel (Make Sure there are no red cross in the Box) :

    .portfolio-items .col:not([data-default-color="true"]) .work-item[data-custom-content='on'] .custom-content img {
        height: auto !important;
        width:100% !important;
    /*  reduce img by 50% by setting max-width */
        max-width:50% !important;
    }

    Thanks


    ThemeNectar Support Team 

  •  2
    petav replied

    Hi Tahir,

    perfect solution, works like a charm.

    Thanks a lot!