简体   繁体   English

在Shopify中移除Google表单下方的大空白(无引导)

[英]Removing large white space underneath Google Form in Shopify (No Bootstrap)

Good evening, 晚上好,

So I'm working on a Shopify landing page for a client, and they want a contact form on the right-hand side of the content, which I had a very little issue creating without the use of Bootstrap. 因此,我正在为客户设计Shopify登陆页面,他们想要在内容的右侧提供联系表单,而在不使用Bootstrap的情况下,创建该表单的问题很少。 However, there is also an image that they would like to use at the bottom of the form as a sort of banner. 但是,他们还希望在表格的底部使用图像作为横幅。 I have tried just adding the image to the page outright, but it would consistently be blurry, so I called the image directly as a scr. 我尝试过将图像直接添加到页面中,但是始终会变得模糊,因此我将图像直接称为scr。 The issue is that there is a large amount of white space between the form and the image, and I'm not quite sure how to adjust that. 问题是表单和图像之间有大量的空白,我不太确定如何调整它。 Code for the landing page is below (I know it's quite messy, but it doesn't seem like CSS styling is possible in Shopify, so I'm doing inline styling within the HTML editor). 登陆页面的代码在下面(我知道它很杂乱,但是Shopify似乎不可能实现CSS样式,因此我正在HTML编辑器中进行内联样式)。

<div class="container" style="display: grid; grid-template-columns: repeat(12, 1fr);">

<div class="content" style="grid-column: span 5; padding-top: 50px;">

<div class="form" style="grid-column: span 7; padding-left: 20px;
transform: scale(0.9);"><iframe src="https://docs.google.com/forms/d/e/1FAIpQLSd7ZZat96_IBMo8eiOrCWFvS0jkZdQKXJXBY1EucosaQ7ZOcQ/viewform?embedded=true"
width="640" height="2161" frameborder="0" marginheight="0" 
marginwidth="0"></iframe></div>

</div>

<img src="https://user-assets-unbounce-com.s3.amazonaws.com/7f3b837c-ab0b-44ad-9174-023129a4e0b5/4de43676-3a0a-485c-a45d-d87af9c7ed96/screen-shot-2018-10-08-at-1-45-11-pm.original.png" width="100%" />

For sake of ease, I've removed the actual content from the first class titled "content," so the code block is as uncluttered as possible. 为简便起见,我从标题为“ content”的第一类中删除了实际内容,因此代码块尽可能整洁。 I have tried rearranging the margins for the form itself, but that didn't really do anything. 我尝试过为表格本身重新设置边距,但这并没有做任何事情。 And if I leave the form at its normal sizing, it doesn't seem to give as much white space at the bottom, but I wanted to scale it down a bit to prevent the form from being so large in comparison to the other content. 而且,如果我将表单保留为正常大小,那么底部似乎不会提供太多空白,但是我想将其缩小一些以防止表单与其他内容相比太大。

I've also added an image of the white space in question. 我还添加了有关空白的图像。 Any help would be greatly appreciated, and hopefully, my code block is formatted correctly for ease of reading. 任何帮助将不胜感激,希望我的代码块的格式正确,易于阅读。 Thank you in advance. 先感谢您。

White space issue 空格问题

In your div.form change your transform: scale(0.9); 在您的div.form中更改您的transform: scale(0.9); to transformX: scale(0.9); transformX: scale(0.9); transform is resizing it X (horizontally) AND Y (vertically) and you only want it to happen horizontally. transform会将其大小调整为X(水平)和Y(垂直),而您只希望它水平发生。

put your image directly under the iframe inside the div.form: 将图片直接放在div.form内的iframe下:

</iframe>

<img src="https://user-assets-unbounce-com.s3.amazonaws.com/7f3b837c-ab0b-44ad-9174-023129a4e0b5/4de43676-3a0a-485c-a45d-d87af9c7ed96/screen-shot-2018-10-08-at-1-45-11-pm.original.png" width="100%" />

  </div>

you may want to remove the padding top from the div.content. 您可能要从div.content中删除填充顶部。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM