Home > Mobile >  Add square beside text form
Add square beside text form

Time:07-19

I want to place a square beside Yes and beside No text as:

enter image description here

I try:

.yesNoSquare {
  width: 10px;
  height: 10px;
  border: 1px solid;
}
<div>
  <span  /> YES
  <span  /> NO
</div>

But it is adding the label inside square, how can I do my expected result?

CodePudding user response:

Try this. Hope it helps.

.yesNoSquare {
  width: 10px;
  height: 10px;
  border: 1px solid;
  display: inline-block;
}
    <div>
      <span ></span>
      <span> YES</span>
      <span ></span>
      <span> NO</span>
    </div>

  • Related