Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS CSS content attr on html5 progress not working.

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #146342
    Pankaj Parashar
    Participant

    HTML

    <progress max="100" value="80" data-value="5"></progress>
    

    CSS

    progress { margin: 50px; width:250px; border:0; }
    

    CSS (Attempt 1)

    progress:before, progress:after { content: attr(data-value); }
    

    CSS (Attempt 2)

    progress::-webkit-progress-bar:before,
    progress::-webkit-progress-bar:after { content: attr(data-value); }
    
    progress::-moz-progress-bar:before,
    progress::-moz-progress-bar:after { content: attr(data-value); }
    

    CSS (Attempt 3)

    progress::-webkit-progress-value:before,
    progress::-webkit-progress-value:after { content: attr(data-value); }
    
    progress::-moz-progress-value:before,
    progress::-moz-progress-value:after { content: attr(data-value); }
    

    None of the above attempts succeeded. Also tried each of the above versions with different css code blocks, for :before and :after.

    OBJECTIVE

    To inject css generated content before and after the html5 <progress> element. Is this possible?

    JsFiddle Demo

    http://jsfiddle.net/pankajparashar/MNL2C/

    #146345
    Paulie_D
    Member
Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘CSS’ is closed to new topics and replies.