Align a div to the right ? I have the code below, as I want my div 20% of a 30% space, but aligned to the right within the page, as that I have a margin on the left.
What is the strange line of text above the doctype? It is causing the browser to go into quirks mode.
Are you writing XHTML or HTML5 code? The doctype says HTML5, but the html line suggests an XHTML page.
Why are these boxes laid out in a form element? Why are they not in a div?
What do you want to put in the middle of the right box with the green border and have centered? What kind of content is supposed to be be centered?
Why is “align-content: center;” still in the code? Twice? As mentioned by Ralph, it is invalid… not real css… home-made-up.
Why is “box-shadow” coded twice with different values? Redundant code. The lower rule replaces the upper rule. That’s the cascade effect.
What goes in the clip:rect which doesn’t look like anything is to be clipped? Is it necessary or is this a test?
In your first post, you said that you wanted a box aligned to the right. This green box is already aligned to the right. I do not understand why you are asking how to float/align a box to the right.
Are you trying to add a column in the left box that is right aligned within the left box?
Mary, if you do not have reasons/rationale for these things, then they probably are not needed, and maybe it would be more productive for you to explain what you are really trying to do.
At the very least, what kind of content is to be centered in the right box?