Skip Navigation

[Resolved] Images added via Toolset Types are not responsive.

The Toolset Community Forum is closed, for technical support questions, please head on to our Toolset Professional Support (for paid clients), with any pre-sale or admin question please contact us here.
This support ticket is created 6 years, 8 months ago. There's a good chance that you are reading advice that it now obsolete.
This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 8 replies, has 2 voices.

Last updated by Anonymous 6 years, 8 months ago.

Assisted by: Luo Yang.

Author
Posts
#559259

Anonymous

Hello. My site has Toolset Types installed. Using Toolset Types, I have a "Post Field Group" defined which contains two images, and I have used a Toolset Types shortcode to add these images to my home page (screenshots: hidden link). But these images do not seem to be fully responsive--they do not behave well as the screen width decreases. They display without issue on my 1900 px wide screen. But as the screen width decreases, the images first begin to overlap, then their aspect ratios become completely distorted (screenshots here: hidden link). Here is the page in-question: hidden link. Why is this occurring, and how can I resolve it?

Thanks in advance.

#559476
image-responsive.JPG

Dear Carl,

First Types shortcode can not output responsive image, in your case, the responsive image is defined by your theme CSS file:
hidden link, line 18:

img.alignright {
    float: right; 
    display: block; 
    padding: 0 0 20px 20px;
}

You can remove it, and test again, see screenshot image-responsive.JPG

#559839

Anonymous
hh-ts-three-front.jpg
hh-ts-three-back.jpg

Thanks for your reply. But I'm a little unclear by your statements.

>> First Types shortcode can not output responsive image

Are you saying that any image added to the page via Toolset Types will not be responsive? I don't think that is the case. I say that because that same page (hidden link) contains three additional images added by a Toolset Types 'post field group' (see attached screenshots)--these three images are indeed responsive as expected.

>> in your case, the responsive image is defined by your theme CSS file:
hidden link?
ver=1502453421, line 18:
You can remove it, and test again, see screenshot image-responsive.JPG

I tried commenting out that line, but the issue was still present. I tried changing float from 'right' to 'none,' but that only alleviated the overlap issue--it did not alleviate the stretching issue at low screen widths.

I'm a bit unclear about the CSS applied to images added via Toolset Types. Shouldn't Toolset Types completely define the CSS applied to each image added via Toolset Types?

Thanks,

Carl

#559846
image-responsive2.JPG

I means this:
Types plugin can output image URL and image HTML code, but it won't apply CSS style to the images, it is your theme who apply the CSS style to the images,

For your question:
-it did not alleviate the stretching issue at low screen widths.

This is defined by your theme file:
hidden link
line 21:

@media only screen and (max-width: 1000px)
.ale-one-half, .articles img, .information .wrapper .block .flcol-3 {
    width: 100%;
}

If I disable it, I see the screenshot image-responsive2.JPG, I suggest you contact your theme author for it.

#559890

Anonymous
hh-ts-banner-offset-editor.png
hh-ts-banner-offset-html.png
hh-ts-banner-offset.jpg

OK thanks for that. I see that now. I will continue to work on the CSS myself to resolve the stretching issue.

One related issue I seem to have with those same two images though is a very slight vertical offset--the two images are not on the same line (see attached screenshot hh-ts-banner-offset). I've looked at the HTML code of the page, and you can see there is a line break (<BR>) after the first image (see attached screenshot hh-ts-banner-offset.html). But I don't see this line break in the WordPress editor (see attached screenshot hh-ts-banner-offset-editor). Am I correct that this line break is the cause of the vertical offset of the images? If so, what is causing this line break, and how do I remove it? If you want me to open a new ticket for this, I can--just let me know.

Thanks,

Carl

#560180

There is a CSS name in the left image "alignleft", and there is another CSS class name in the right image: "alignright",
CSS class "alignright":
padding: 0 0 20px 20px;

I suggest you add same CSS code to "alignleft", for example, add below codes into your theme/style.css:

img.alignleft{
padding: 0 0 20px 20px;
}
#560252

Anonymous

Thanks for the reply.

>> I suggest you add same CSS code to "alignleft", for example, add below codes into your theme/style.css:

I tried that, but it did not resolve the issue (see my dev site here: hidden link). I also tried removing the padding completely from both images, but that also did not work.

You don't think the issue is due to the extra line break (`<BR>`) between the images?

Thanks,

Carl

#560267

This is a new question, please create new thread for the new question, that will help other users to find the answers.

#560274

Anonymous

OK I will do so. Thanks for your help.

The forum ‘Types Community Support’ is closed to new topics and replies.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.