Archived topic
Top Bar bottom margin? (using block element > hook)
14 replies · Started by Mark on September 1, 2021
I have a GPP site at hardyness20.michianait.net. I'm trying to create a top bar for the home page. I have used container > grid > container > headline.
1. How do I set the width of the Top Bar?
2. Where is the white space coming from below the red top bar, and how do I eliminate it?
3. When I click "Preview" it asks me for desktop, mobile, etc. but how do I actually preview the page?
Thanks in advance,
Mark
Hi Mark,
For #1 and #2:
CAn you link us to the site in question? To inspect the top bar element and see what's responsible for the white space.
For #3:
The preview attempts to show how it will look on the from end but this is unreliable.
The best way to check how the front-end looks is by selecting the "Preview in new tab" option instead of "desktop", "tablet" and "mobile.
Elvin,
It’s hardyness20.Michianait.net
I don’t seem to have the option “preview in new tab; just the device choices.
Mark
I don’t seem to have the option “preview in new tab; just the device choices.
You mean you don't see this? https://share.getcloudapp.com/12uv0pOK
If that's the case, the next best thing is to actually save your changes and view it on the front end. :D
Ok, then if you could just reply to #1 and #2, that would be great.
Mark
Also,
I would like a response to how I could fix issue #3 (about the preview in new tab not appearing).
I have provided login details in the box below.
Thanks,
Mark
I just did some experimenting. It seems that just on the "elements" section, I don't get the "preview in new tab" option. When I click "preview" a dropdown appears with only 3 options (desktop, tablet, mobile), but there is no fourth link that says "preview." So I can select what type of device, but the link for actually previewing it, is not there.
Mark
Hi there,
#1. Select the parent Container Block. In the Settings > Layout you can set the Container Width:
https://docs.generateblocks.com/article/container-overview/#layout-–-standalone-block
#2. With that block still selected go to Spacing and remove the Bottom Margin which is set to 2px.
#3. Preview is not available in the Block Element, as Block Elements don't display until they are hooked into a Post.
Hi David,
Thanks for your reply and advice. I (think) I was successful in following your directions and the top bar (with a one column grid looks fine. However, when I tried it with 3 columns, I used the same parent container suggestions, but wasn't able to get the column headings to look centered. Could you have a look?
Thanks,
Mark
hardyness20.michianait.net
Hi David,
Please excuse my last email - I found the problem (I didn't realize I had to center the alignment in in Headline block)
However, I'm still trying to figure out what determines the height of the top bar (I would like to set the height of the two bars)
Thanks,
Mark
Unless you set a Container Blocks Minimum Height ( in Spacing ) its sizing will come from:
1. The Container Blocks Top and Bottom Padding.
2. The Content within the Block, and any Margins and Padding that is applied to those blocks.
In your second bar, you have additional height coming from the H6 headlines, they have a default bottom margin applied to them, which can be set to 0 by selecting the headline block and editing its margins.
Thanks David.
You are up early!
Mark
Rather late actually - i think the forum time is PDT, which covers the GeneratePress office. I am in the UK :)
Glad to be of help.
Either way, you have been a great help. Thanks,
Mark
Thank you!