usability – Best practices: Position of the cancel button in modals

I am currently working on modals for our software and have always placed the "Cancel" button on the far left (version A in picture). However, while documenting more about modals, I discovered that most websites seemed to bring the main button closer to the right button (version B in the image). Is there a particular reason for conviviality for which the second option is more adopted? I do not know if I should keep version A or not. Thank you to everyone who will answer!

modal options

Positioning buttons on modals – should it be consistent at ALL times?

I am currently designing an application for iPad.

I have illustrated the situation below:Problem of the type of image

The screen on the left is the current version that seems to work very well when the user does not have to use the keyboard or if there are only one or two text fields (the modal window is short enough for the keyboard "button).

Currently, when the keyboard overlaps the window (middle image), I move the "Create" button in the upper right corner so that the main button is not obstructed.

  • Should I change the middle version of the image to the right one in
    in order to be consistent?
  • Is there another solution to my problem?

Hi and sorry for the bad english;)

Should I use modals for advertising?

I have a website on which I want to advertise a specific product / service. Is it ok to use a modal that displays the product in gray on the rest of the screen or will it divert visitors?

Edit: The modal I plan to use will appear in the center of the screen and will cover the rest of the gray. The box will contain a coupon code for $ 50 off and a small Google ad. The box can be easily closed with the X button in the corner and clicking outside the box. It is mostly unobtrusive.