How do I set this code up so that the text doest wrap?

I’m guessing you simply made an error in copying and pasting and missed a <div> tag. The code you have there is complete. Try again.

You could make it less cumbersome and easier to read by removing all the repeated styles. Even using inline styles, you can cut down on the clutter by applying shared styles to the parent (in this case, your second <div>) and only adding styles to the <span> tags where they differ.

<div style="float: right; white-space: nowrap;font-family:'Times New Roman'; font-weight:700; font-size:36px; line-height:40px;">
  <span style="color:red;text-indent: 43px ;margin-right:80px;">In Stock </span><span style="color:green;">$24.99 USD*</span>
</div>

instead of

<div style="float: right;">
  <span style="white-space: nowrap;font-family: Times New Roman;color:red;font-weight:700;font-size:36px;line-height:40px;margin-right:80px;">In Stock </span><span style="white-space: nowrap;font-family: Times New Roman;color:green;font-weight:700;font-size:36px;line-height:40px;">$24.99 USD*</span>
  <br>
</div>

You should also remove those <br> tags, as they are not needed. Use margins or padding if you want extra space.

1 Like