Skip to content
Grav 2.0 is officially stable. Read the announcement →
Support

Submit & reset button inline help

Started by Duc 10 months ago · 5 replies · 200 views
10 months 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
10 months ago

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

10 months 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
10 months 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.

10 months 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 Anna, 14 hours ago
1 43 7 hours ago
Support · by gtx, 1 week ago
4 227 1 day ago
Support · by Paul Hodges, 2 weeks ago
13 274 5 days ago
Support · by Anna, 3 weeks ago
9 333 1 week ago
Support · by TomW, 2 weeks ago
4 187 1 week ago