Quantcast
Channel: Active questions tagged html - Stack Overflow
Viewing all articles
Browse latest Browse all 72443

How to make the first element aligned to the right and the other elements in the left of that first?

$
0
0

I have two HTML elements: label and span inside a div I want the label aligned to the right and the span in the left of the labe;

like this :
enter image description here

But this is what I have:

enter image description here

this is the HTML and CSS code:

.barcode-pdf-body div {
  text-align: right;
  border-color: transparent;
  margin-top: 0;
  font-size: 10px;
  margin-bottom: 9px;
}

.barcode-pdf-body div label {
  margin-left: 5px;
  font-weight: bold;
  font-family: "myFont";
}
.barcode-pdf-body div span {
  font-family: "myFont";
}
<div><label>
            {% trans 'constraint_number' %}:</label><span>
            {{ correspondence.number }}</span></div>

Viewing all articles
Browse latest Browse all 72443

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>