Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

Submit & reset button inline help

Started by Duc 1 year ago · 5 replies · 465 views
1 year ago

Hello. Using the delivernext theme. I’ve added a reset button to the contact form, but the placement is off. I wish to have it where the green box is. On the receptar theme, it aligned perfectly with the same class submit.

TXT

2025-09-28_16-36-45|575x499

_2025-09-28_16-39-12|540x108

last edited 09/28/25 by Duc
1 year ago

I'd assume btn-block class makes both buttons as block elements

1 year ago

@duceduc, That's because css forces \<button> to use block layout, while by default a \<button> is inline.

CSS
.contact button {
    font-family: "novecento_sans_widedemibold", "Helvetica", "Tahoma", "Geneva", "Arial", sans-serif;
    text-transform: uppercase;
    display: block;
}

After fixing that, the button is displayed in the center because of:

CSS
form .buttons {
    text-align: center;
}

There are multiple solutions possible:

  • Fix the above issues mentioned above and add some margin to the \<button>
  • Or use display: flex and add some margin
1 year ago

Well, it would be interesting to open an issue in the repository of the theme so that I can take it into account for future versions. Almost all the styles of this theme are inherited from the original Deliver theme.

1 year ago

According to @pamtbaau, I've made a change that I'll integrate into the next version of the theme, in the _forms.scss file, leaving the code as follows:

CSS
form {
.buttons {
text-align: center;
display: flex;
justify-content: flex-start;
gap: 1rem;
}

This will make the buttons in the same block inline. All that remains is to compile the main.css and main.min.css files again to see the result.

image|690x492

👍 1

Suggested topics

Topic Participants Replies Views Activity
Support · by TomW, 1 day ago
1 36 15 hours ago
Support · by TomW, 1 day ago
0 44 1 day ago
Support · by TomW, 5 days ago
6 129 2 days ago
Support · by Anna, 2 weeks ago
2 164 5 days ago
Support · by Anna, 4 weeks ago
1 332 4 weeks ago