I'm using the Antimatter theme. in a page I have defined a standard form with a name and a email field as in the example page. I modified the standard default.html.twig file to look like this:
{% extends 'partials/base.html.twig' %}
{% block content %}
{{ page.summary }}
<table>
<tr >
<td align="center">
{% include "forms/form.html.twig" with { form: forms('contact-form') } %}
</td>
</tr>
</table>
<br><br>
{{ page.content|slice(page.summary|length) }}
{% endblock %}
This happens:
The two fields and their labels get centered but the Submit and Rest buttons are still left alingned. How come?
Archive
The alignment is related to CSS. Do you have a live site I can see to be able to point you in the right direction?
Dear rhukster. Thank you. I seemed to have missed the yaml-file user/config/plugins/custom-css.yaml with the following content:
enabled: true
css_inline: ".input[type="text"] {\r
width: 50%;}\r
input[type="email"]{\r
width:50%;\r
}\r
\r
button {\r
float:center;}"
Unfortunately I can't remember having set this up. Maybe it is set-up by the admin panel. I don't know. Anyway, this solved my problem.
Log in to reply.
Suggested topics
| Topic | Participants | Replies | Views | Activity |
|---|---|---|---|---|
| 0 | 1362 | 9 years ago | ||
| 2 | 940 | 9 years ago | ||
| 2 | 4069 | 9 years ago | ||
| 1 | 2959 | 9 years ago | ||
| 3 | 1124 | 9 years ago |