I've created an website page in the HubSpot Template, HubStrap Lite. I've tried to add a form to this page however I haven't been able to target the form and edit to the CSS so that it displays correctly. I'd like the form to be centred, much smaller and with smaller gaps between each section of the form but I can't edit it. This is a page that highlights the issue with the form: https://www.oneupcoworking.com/?hs_preview=KgFVFQof-24452293028
Any suggestions on how I would be able to style the form?
On one of the HS layout modules a font-size of 100px has been applied.
This combined with the line-height property, inherited from the body tag adds up to some aggressively tall elements (I'm not a fan of applying line-height on the body tag I prefer BEM style css application).
So we remove that and it'll look like this:
To center this I would advise you use the drag and drop template editor as it would be the easiest and wouldn't require any css to be overriden.
EDIT:
These IDs might be dynamic, so the solution below might not be viable.
But you could and some css like so:
form#hsForm_c3016f0f-6ce5-4ba8-8d18-a63ccb17e242_2091 {
width: 100%; /* make the form fluid */
max-width: 500px; /* change max width here */
margin: auto; /* center it */
}
form#hsForm_c3016f0f-6ce5-4ba8-8d18-a63ccb17e242_2091 input[type="email"],
form#hsForm_c3016f0f-6ce5-4ba8-8d18-a63ccb17e242_2091 input[type="text"] {
width: 100%; /* set width to prevent overflow */
}
Now it looks like this:
Now to your trouble targeting the form:
This might be due to the very specific CSS that is applied via an inline style tag. So you'd have to try to get more specific to style these elements any further. This code CSS looks like this:
Now I'm not sure but this CSS maybe coming from the form editor. You could select to have the form be output unstyled and then styling would be a lot easier.
On one of the HS layout modules a font-size of 100px has been applied.
This combined with the line-height property, inherited from the body tag adds up to some aggressively tall elements (I'm not a fan of applying line-height on the body tag I prefer BEM style css application).
So we remove that and it'll look like this:
To center this I would advise you use the drag and drop template editor as it would be the easiest and wouldn't require any css to be overriden.
EDIT:
These IDs might be dynamic, so the solution below might not be viable.
But you could and some css like so:
form#hsForm_c3016f0f-6ce5-4ba8-8d18-a63ccb17e242_2091 {
width: 100%; /* make the form fluid */
max-width: 500px; /* change max width here */
margin: auto; /* center it */
}
form#hsForm_c3016f0f-6ce5-4ba8-8d18-a63ccb17e242_2091 input[type="email"],
form#hsForm_c3016f0f-6ce5-4ba8-8d18-a63ccb17e242_2091 input[type="text"] {
width: 100%; /* set width to prevent overflow */
}
Now it looks like this:
Now to your trouble targeting the form:
This might be due to the very specific CSS that is applied via an inline style tag. So you'd have to try to get more specific to style these elements any further. This code CSS looks like this:
Now I'm not sure but this CSS maybe coming from the form editor. You could select to have the form be output unstyled and then styling would be a lot easier.