Languages
[Edit]
EN

CSS - white-space: pre with <option> (spaces in option)

6 points
Created by:
Root-ssh
92330

The article topic is called: CSS - white-space: pre with <option> (spaces in option)
But it is impossible to get pre effect with styles - there is some trick: use &nbsp; code in HTML to fill spaces.

white-space: pre with <option> solution
white-space: pre with <option> solution

Practical example:

// ONLINE-RUNNER:browser;

<!doctype html>
<html>
<body>
  <form>
    <label>Layout: </label>
    <select style="font-family: monospace">
      <option value="files">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Details</option>
      <option value="details">Files&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</option>
      <option value="files+details">Files + Details</option>
    </select>
  </form>
</body>
</html>
Native Advertising
­čÜÇ
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

ÔŁĄ´ŞĆ­čĺ╗ ­čÖé

Join