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

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Support

Submit & reset button inline help

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

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

9 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
9 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.

9 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 Thomas, 1 week ago
2 54 12 hours ago
Support · by Anna, 3 days ago
2 60 14 hours ago
Support · by Justin Young, 15 hours ago
1 30 15 hours ago
Support · by Duc , 1 week ago
2 65 5 days ago
Support · by Colin Hume, 1 week ago
2 57 5 days ago