Float the span element inside the td

How can I set the span element float towards the right of the td element … Read more Float the span element inside the td

How can I set the span element float towards the right of the td element in the HTML?

enter image description here

In the above image, I need to place the text 1 (small letter) floating towards the right of the column. Inside the column, there is already an input field that exists.

I have tried out different ways to set through the CSS but didn’t work.

I want to make that text 1 always aligned right to the input field like superscript and maintain the position in the responsive template.

Code:

  <table>
    <tbody>
      <tr>
       <td>House</td>
       <td>
         <span class="position-absolute badge-tooltip">
               1
         </span>
         <input class="form-control rounded-0 border-0 m-0 d-block text-right" type="text" />
       </td>
       <td></td>
       <td></td>
      </tr>
    </tbody>
  </table>

CSS

.badge-tooltip {
  float: right;
}

Source: CSS – Stack Overflow


Categories: NewsTags: , ,

Tags: , ,


Leave a Reply

Your email address will not be published. Required fields are marked *