• Resolved kerdezo

    (@kerdezo)


    Hi friends,

    I made some experiments adding the same image banner to S1 and S2 sidebars,by using the default Text and HTML widget.
    The image banner was identified by Html adding an img width=”290″ height=”290″.
    Everything worked except size.
    In the S1 the image was rendered to 280×132.21( Well, the padding is set to 30px,so cropping width makes sense,but I was expecting 280×280 to display).
    In the S2 the image was rendered to 200×94.433.( I was expecting 200×200 )

    The interesting thing is the fact, that in the case I’am giving a text to this widget, the height is expanding due to the length of the text content, but this rule seems to be invalid when adding an image.Why?

    Does this mean that any sized image(banner), added to this widget, will have always a default size displaying in a sidebar? I can not add any other height dimensions?

    If so, how is it possible to display an Ad Sense code image-ad (adding the code to the widget) with a size of – say – 280×280 ? Will it work only with text ads?

    thanks

Viewing 1 replies (of 1 total)
  • Thread Starter kerdezo

    (@kerdezo)

    Well, I have figured out, but the result is interesting.

    The image in the widget is inheriting the ratio of the original src. image. In spite of the fact that a new dimension ratio was defined.
    The original ratio seems to be overriding the defined html size/ratio.

    The src. image (banner) was 720×340.
    I defined a 280×280 new size for the widget by this snippet:

    <a href="https://www.hirstart.hu/" target="-blank"><img alt="Banner" width="280" height="280" src="https://www.mosthallottam.hu/wp-content/uploads/2016/06/g%C3%B3ly%C3%A1k.jpg"/></a>

    I was expecting a square shaped outcome,(because the same source image is cut by the Theme to a 200×200 on excerpt thumbnail) but the result was rectangular.
    The original image size ratio can not be overridden to a new ratio by html in the HTML and Text Widget. The html is not going to crop the image, but only complying with the available width and then displaying a proportional view, maintaining the original src. image’s ratio.

Viewing 1 replies (of 1 total)
  • The topic ‘Image banner size in S1 and S2’ is closed to new replies.