You are viewing limited content. For full access, please sign in.

Question

Question

alignment

asked on January 30, 2024

How do I move only the date box to the right side of a form? in V10 it was as simple as "float".  Can't do that with 11.  the only way I've found is to insert an empty html box on the line and re-size it to move the date box.  is that the answer?  can anyone provide some CSS for this?

Thanks

0 0

Replies

replied on January 30, 2024

I do the empty HTML field trick too.  I would recommend that over trying to tweak the way the layout works via CSS.

2 0
replied on January 31, 2024 Show version history

I agree that the empty HTML field is probably the easiest way. Part of the reason is that any CSS modifications could have adverse effects on how the form behaves in mobile views and such.

 

The reason float doesn't work is because the modern layout uses flex containers, which make pages a lot more responsive, but that does mean adjusting the style requires a different approach.

Normally you can use justify-content to align items within a flex container, but that gets a bit tricky because the custom CSS classes don't apply to the top-level parent making it harder to target a specific one.

Instead, you can customize the field width and use margins to adjust the position of the field within the parent flex container.

For example, if you really want to do this with CSS you could add a CSS class to your field, and do something like the following

.rightAlign {
  width: 50%;
  margin-left: auto;
}
0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.