Forums

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

Home Forums CSS Asterisk as

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

    Hi.
    I’m trying to style the hr as an asterisk, but, as usual, IE is quite stubborn. Here’s what I have so far:

    
    hr {
        text-align:      center;
        border:          none;
        height:          0;
        line-height:     0;
        margin-top:      1.95em;  /*  (3 × leading) ÷ 2  <em>/
        margin-bottom:   1.95em;  /</em>  (3 × leading) ÷ 2  */
        }
    
    hr:after {
        content:         "*";
        }
    

    This works in Chrome and Firefox, but IE shows only space between paragraphs.
    Any ideas?

    #188415
    Paulie_D
    Member

    Since you’re using a pseudo element anyway, why not use another element (div / span / p) with the asterisk and use an .hr class.

    Simpler all round and probably more cross-browser compliant.

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