Skip to content
● Grav 2.2 is out: 2x faster cold starts and 96% less memory on big sites. Read the announcement →

Submit & reset button inline help

Started by Duc 1 year ago · 5 replies · 349 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 webmasterodp, 1 week ago
4 153 6 days ago
Support · by nwhitfield, 1 week ago
2 134 1 week ago
Support · by stell, 3 weeks ago
5 369 2 weeks ago
Support · by gravinator, 1 month ago
5 559 2 weeks ago
Support · by Gravver, 3 weeks ago
6 347 3 weeks ago