[Solved] Aligning div text to right


You need to change

align=right

to

text-align: right;

Example:

.center {
  margin-left: auto;
  margin-right: auto;
  width: 800px;
}
<div class="center">
  <div style="display:inline-block; width:200px; text-align: right;">Enter text</div>
  <div style="display:inline-block; width:200px;">
    <input type="text" size="15" />
  </div>

  <div style="block"></div>
  <div style="display:inline-block; width:200px; text-align: right;">Big entry for text</div>
  <div style="display:inline-block; width:200px;">
    <input type="text" size="15" />
  </div>
</div>

JSFiddle

solved Aligning div text to right