this one helps. Ok, I figured out how to make it work with only constraints. There were just too many interconnected dependencies and the system couldn't handle it. I was selecting the entire grid of buttons and adding Equal Heights and Equal Widths constraints to all of them, which meant each button was dependent upon every other button. Instead, I did it row by row. I selected one row:
How does one create 2 buttons next to each other that are equal in width and height?
will be helpful for those in need Your screen width too small for both buttons to appear correctly. Only first button displayed at the full size, the other button forced to smaller size. If you need these buttons to cover all screen width and be equal size, then put buttons in LinearLayout, set both buttons width to "0dp" and weight to "1":
wish of those help You can place a single paragraph element inside a div and give the p a margin using calc() which takes into account the width of the div (because % is always based on the width of the parent element). Working Example:
color: rgb(255, 255, 255);
background-color: rgb(255, 0, 0);
margin: calc(50% - 12px) 0; /* half the width minus half the line-height */
<p contenteditable="true">Click me & edit to change div size.</p>