How would you style text like a fraction?

How would you style text like a fraction?

how to make a fraction in word 2016
fraction font
word force fraction
font-variant-numeric not working
how to insert 1/8 in word
how to write fractions in word 2007
fractions in indesign 2019
microsoft word 1/3 symbol

I have a styling question where I want the font to look similar to my crummy MSPaint example.

I have tried a myriad a of things like using bootstrap and trying to build it through the grid system but there was some pretty bad white-space issues and it did not scale well.

The help would be amazing.


you can add the % off with a pseudo element

.discount {
  display: inline-block;
  position: relative;
  font-size: 40px;
}
.discount::after {
  content: "% off";
  display: block;
  left: 100%;
  font-size: 18px;
  line-height: 18px;
  top: 50%;
  transform: translateY(-50%);
  position: absolute;
}
<div class="discount">50</div>

Format fractions like an expert, One way to apply the OpenType Fractions option throughout an entire document - but only to fractions - is by using GREP Styles. They're like a Find/Change function inside a style. Open the Paragraph Styles panel (Type>Paragraph Styles), and double-click the appropriate style to edit it. The most common typographic treatment (unless otherwise requested) is the diagonal fraction. (Some clients and style manuals may prefer spelled-out fractions in running text, but guidelines for this are often inconsistent, and occasionally even contradictory.) Diagonal fractions can be categorized as prebuilt, automatic, or custom-made.


You can use grid and flex to achieve this

.row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    width: 50px;
}

.row .col {
    font-size: 3rem;
}

.row .col2 {
    display: flex;
    flex-direction: column;
    font-size: 1.3rem;
}
<div class="row">
    <div class="col">
        50
    </div>
    <div class="col2">
        <div class="top">
            %
        </div>
        <div class="bottom">Off</div>
    </div>
</div>

Engineering Drawing and Design, FULL HEIGHT OF LETTERS COULD BE READ AS 15/8 WITHOUT When using CADD, the text style determines the fraction bar orientation. You can easily set  Other fractions require a hyphen and individual figures, with a space between the whole number and the fraction. For example, 1 3-16; 2 1-3; 5 9-10; In tabular material, use figures exclusively, converting to decimals if the amounts involve extensive use of fractions that cannot be expressed as a single character.


try this one...

<h3 style="display: inline-block;">
    50  <sub style="margin-left: -4%;">off</sub>
    <sup style="margin-left: -32%;"> % 
   </sup>    
</h3>

font-variant-numeric, We're talking about things like fractions (e.g. 1/4), ordinals (e.g. 1st) numerals, and 'lowercase' numerals called old-style or text numerals. When a fraction is found in the text, we want InDesign to apply the OpenType Fractions option, so let's make a new Character Style to do just that. Under Apply Style, click on [None]. Click on it again, and from the menu choose New Character Style.


You can try this (if you need separate % and OFF to style them separately):

.discount{
  position: relative;
  font-size: 40pt;
  font-weight: bold;
}
.discount:after{
  content:"%";
  position: absolute;
  top:0;
  left: 100%;
  font-size: 18pt;
  box-sizing: border-box;
}
.discount:before{
  content:"OFF";
  position: absolute;
  bottom:0;
  left: 100%;
  font-size: 18pt;
}
<span class="discount">50</span>

Adobe InDesign CS4 Styles: How to Create Better, Faster Text and , How to Create Better, Faster Text and Layouts Michael Murphy Most handle standard fractions like 1⁄2 and 3⁄4 without a problem, but some (like Warnock Pro​  The numerator of this fraction is three and the denominator is 10. To express the fraction in words, write the numerator, add a hyphen and then spell out the denominator. In word form, the fraction 3/10 would be spelled out as three-tenths.


Find the complete code below for custom and normal fractional representation:

<!DOCTYPE html>
<html>

<head>
  <title>Fraction</title>
  <style>
    * {
      font-family: sans-serif;
      font-weight: 600;
    }
    
    .wn {
      font-size: 45px;
    }
    
    .frac {
      display: inline-block;
      position: relative;
      letter-spacing: 0.001em;
    }
    
    .frac>span {
      display: block;
      padding: 0.1em;
    }
  </style>
</head>

<body>
  <h3>To display custom fraction</h3>
  <div><span class="wn">50</span>
    <div class="frac">
      <span>%</span>
      <span class="bottom">OFF</span>
    </div>
  </div>
  <hr>
  <h3>To display normal fractional representation</h3>
  <div>1 &frac12;</div>

</body>

</html>

Formatting Fractions (Microsoft Word) - Word Tips, Simply make sure that the AutoCorrect entry is saved as formatted text, and you will be able to use your new fraction quickly and easily. Like fractions are fractions that have the exact same denominator. That's it! We would be working with wholes that are split into the same number of pieces. It doesn't matter what the numerator is, so long as the denominators are the same. So what this means is that if John have a pie and his sister has a pie,


Creating Fractions - Word FAQ site, In some cases, Word automatically converts text you type into fraction characters. but only one of them will produce fractions in the same style as ¼, ½, and ¾. In the Grammar books I use, the rule for fractions states that when the fraction is being used as an adjective, you hyphenate it. (Ex. Two-thirds majority won the vote.) When you use the fraction as a noun, you don’t use the hyphen. (Ex. Two thirds of the pie was eaten. Two thirds here is the subject and therefore gets no hyphen.)


How do I change the font in equations and fractions in Microsoft , In Word 2016 you can change font sizes, styles or even paragraph style in every equation like a usual text. To change a font size & style in an equation (how to  Like Fractions And Unlike Fractions A fraction is a number representing a part of a single whole object or a group of objects. It is defined by two numbers, one on top and the other at the bottom of a fraction bar, known as numerator and denominator respectively.


How do I type fractions into Microsoft Word?, Be sure to select the Replace text as you type check box. Choose which style fraction you Duration: 0:24 Posted: Aug 23, 2010 The guide you use will indicate whether to write out percent or use the symbol after the number. But style manuals do more than inform you of the correct way to write a number and a percent sign; they also explain how to format the paper, lay out the title page, format the margins, use footers and headers, and figure out where to place the page number and footnotes, for starters.