Skip Navigation

[Resolved] Text and image grid cell alignment

This support ticket is created 7 years, 3 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 10:00 - - - - -
- - - - - - -

Supporter timezone: Africa/Cairo (GMT+02:00)

This topic contains 4 replies, has 2 voices.

Last updated by Mohammed 7 years, 2 months ago.

Assisted by: Mohammed.

Author
Posts
#542396

I am trying to: This are 2 grid cells. I added text into one and an image into the other. I am trying to make the "blue text box" and "image box" the same size no matter what display resolution they are shown. In the attached images you can see how they are different for different display resolutions.

I visited this URL: please provide a private field where I can paste down the page link and password (the page is set private)

I expected to see: The image and text boxes resizeing proportionally

Instead, I got: Depending on the screen resolution, the text box is smaller/taller than the image box. Thank you in advance

#542600

Hi Roki,

Thank you for contacting the Toolset support forum.

I'm Mohammed, the Toolset support team leader. I will do my best to help you.

I see that this can be fixed using Jquery. Before starting working on it, We need to agree together, which one will depend on the other.

I'm thinking of that, the image height will depend on the text or the inverse.

In other words, in all cases, we can catch the text cell height and then set he height of the image to be equal to the text height or vice versa.

Please let me know your decision.

I will set the next reply as a private one so that you can provide your website access credentials and FTP access and also the page password.

I will be waiting for your reply.

Thanks.

#542978

Hi Roki,

The following worked with the first row perfectly but didn't work as expected with the rest of rows because the text boxes and images styles are not the same in all the rows.

Add the following script to the footer of your theme:

<script>
jQuery(document).ready(function($){
jQuery('.light_blue_tetra1,.light_blue_tetra2,.light_blue_tetra3').each(function(){

jQuery(this).height(jQuery(this).parent().find('.alignnone').height()-15);
});
 });
</script>

Add the following syle to the footer of your theme:

<style>
.alignnone {
    margin: 0px 20px 20px 0;
}
</style>

So, please make sure that all the images and text boxes paddings and margins are the same and try the previous code.

Thanks.

#543429

Thank you very much, with small edits on your suggestion I managed to resolve the issue. Have a nice weekend! ????

p.s. Could you please remove the images from my first post or just blur the text? There have been some changes and this text wont go public. Thank you

#552390

Done 🙂

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