Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Add square beside text form

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

enter image description here

I try:

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

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

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

>Solution :

Try this. Hope it helps.

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

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading