#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2002
    Location
    Mumbai
    Posts
    108
    Rep Power
    13

    Display fractions


    Dear all

    I want to display fraction numbers for website that teaches addition and substration of fractional numbers


    normally we write a .5 as 1/2 .25 as 1/4
    I want to change the format and display
    1/2 as 1 upon 2 (1 then there wil be dash "_" below it and below that number 2) on a single line

    Repeating :
    in shot 1/2 should be displayed as
    1 upon 2
    or
    1 then there wil be dash "_" below it and below that number 2 on a single line

    is this possible using css or any other method

    example

    1
    --
    2
    Last edited by vikaspa; November 2nd, 2012 at 04:48 AM. Reason: wanted to show an example
  2. #2
  3. Lord of the Dance
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Oct 2003
    Posts
    3,648
    Rep Power
    1945
    What about this method:
    http://changelog.ca/log/2008/07/01/writing_fractions_in_html

    Not exactly the format you search for but maybe close enough?
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2012
    Posts
    16
    Rep Power
    0
    Go ahead and try this. Not to sure how intuitive this will be for you, but worked fine for me!

    PHP Code:
    <style>
    li{
        list-
    stylenone;
    }

    .
    top{
        
    width10px;
        
    border-bottom1px solid;
    }
    </
    style>
    </
    head>

    <
    body>
    <
    ul>
        <
    li class="top">1</li>
        <
    li>2</li>
    </
    ul>
    <
    ul>
        <
    li class="top">1</li>
        <
    li>2</li>
    </
    ul>
    </
    body

IMN logo majestic logo threadwatch logo seochat tools logo