Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTML unicode ☰ not detected in mobile web application menu in android chrome browser

i have a issue in my website menu in android mobile chrome browser that is not able to show unicode ☰ . but if i am check my web application in iPhone or other android browser it is rendering or working properly.

I am used this icon in this structure

<ul>
    <li>&#9776;☰</li>
    <li>Home</li>
    <li>About Us</li>
</ul>

But it is not show in mobile chrome browser How to fix it!

like image 573
Mohammed Javed Avatar asked Sep 19 '14 08:09

Mohammed Javed


People also ask

Can I use Unicode in HTML?

You can enter any Unicode character in an HTML file by taking its decimal numeric character reference and adding an ampersand and a hash at the front and a semi-colon at the end, for example &#8212; should display as an em dash (—).

What mean UTF-8 in HTML?

Introduction to UTF-8 in HTML. UTF-8 is defined as the default character encoding for HTML5 used to display an HTML page perfectly. It encourages web developers to use UTF-8 as it covers all the characters and symbols in the entity that uses one byte and works well in all the browsers.

Is UTF-8 and Unicode the same?

UTF-8 is one possible encoding scheme for Unicode text. Unicode is a broad-scoped standard which defines over 140,000 characters and allocates each a numerical code (a code point). It also defines rules for how to sort this text, normalise it, change its case, and more.


2 Answers

You could easily use three pipe characters | and rotate them 90degrees using the transform: rotate(90deg) function! Here's what I've done:

  <nav role="navigation" id="nav-hamburger-wrapper">
    <input type="checkbox" id="nav-hamburger-input"/>
    <label for="nav-hamburger-input">|||</label>
  </nav>

and in CSS:

#nav-hamburger-wrapper label,
#nav-hamburger-input {
  transform: rotate(90deg);
  transition-duration: 0.3s; /* give it a rotation effect when checked */
}
#nav-hamburger-wrapper input:checked + label {
  transform: rotate(0);
}

Enjoy ;-)

like image 107
Pedram Avatar answered Oct 07 '22 05:10

Pedram


We can also create hamburger/menu icon using some CSS and HTML stuff that works fine on all versions of browsers without making any break. It works fine on all mobile and desktop browsers.

.hamburger-icon {
    margin: 0;
    padding: 19px 16px;
    display: inline-block;
    position: absolute;
    top: 0;
    left: 0;
}
.hamburger-icon span {
    width: 40px;
    background-color: #000;
    height: 5px;
    display: block;
    margin-bottom: 6px;
}
.hamburger-icon span:last-child {
    margin-bottom:0px;
}
<label class="hamburger-icon">
    <span>&nbsp;</span>
    <span>&nbsp;</span>
    <span>&nbsp;</span>
</label>
like image 40
Mohammed Javed Avatar answered Oct 07 '22 03:10

Mohammed Javed