Archived topic
Button horizontal fill on mobile
7 replies · Started by Erika on May 24, 2022
Hi there,
I have a button in the site header which is created as a block. The button is added as inline element. On mobile I have set the button to horizontal fill and vertical stack and in the preview it looks okay, but not on devices. Any idea why?
Thanks, Erika
Hi Erika,
I tried viewing your site and this is what it looks like on mobile: https://share.getcloudapp.com/OAu8m4L1
Also checked in my personal phone and it looks the same.
Is this how it should look like? If it is, and it looks different from your end, can you try clearing the cache of your device’s browser, or try using a different browser?
Kindly let us know. :)
Hi Fernando,
thanks for checking out. The button should fill the horizontal space on mobile, that is what I try to reach. I. e. the button should go from side to side on mobile. For this I have set on mobile the button stack verticall and fill horizontal, but nothing happens.
Thanks, Erika
Hi there,
can you go to Dashboard > GenerateBlocks > Settings and click the Regenerate CSS button. Then clear any plugin caches and let us know.
Hi David,
unfortunately no change. Any other idea?
Erika
ok... its the other CSS we used to stack them thats causing a problem.
Change this CSS:
@media (max-width: 768px) {
.gb-container.inline-post-meta-area > .gb-inside-container {
flex-direction: column;
}
.site-footer > div:last-child {
text-align: center;
}
}
to:
@media (max-width: 768px) {
.gb-container.inline-post-meta-area > .gb-inside-container {
flex-direction: column;
}
.site-footer > div:last-child {
text-align: center;
}
.element_fixed .gb-button-wrapper {
width: 100%;
}
}
Hi David,
aaahh, ok! Thanks for finding the problem :)
Erika
Glad to hear its working!