Search code examples
htmlcsscharacter-entities

Using a square from the html entities inside a hr


I am styling my hr and for that,i am having this character § at the center.This is the code

hr.style-eight:after {
 content: "§";
 display: inline-block; 
position: relative;
 top: -0.7em;
 font-size: 1.5em;
 padding: 0 0.25em;
 background: white; 
}

I have looked at several character entities cheat sheets for a square character but nothing so far.Is there square character in the existing html or html5 entities that i can use or an alternative method in css3 that can produce the square?.


Solution

  • From the HTML5 Character Entity Reference (which you've supposedly already looked at):

    □
    □ □ □
    □
    □
    

    There's also:

    ▪
    ▪ ▪ ▪ ▪
    ▪
    ▪