Home > Software design >  how do i fix space not working in classNames?
how do i fix space not working in classNames?

Time:07-17

i am using icons from fontawesome and classNames with space in it, are not working ??

<nav className="navbar">
    <div className="navbar-container">
        <Link to="/" className="navbar-logo">
            MRN <i calssName='fab fa-typo3'/>
            <div className="menu-icon">
            </div>
        </Link>
    </div>
  </nav>

CodePudding user response:

The Icons from awesomefont should be like this

<\i>

CodePudding user response:

when selecting font-awesome classes in css, you only need one of the two class names; fab or fa-typo3. so if you're using only one icon in your entire page, do this:

.fab{ color: #fff; }

and if you have multiple icons, be more specific:

.fa-typo3{ color: #fff; } }

CodePudding user response:

<nav className="navbar">
    <div className="navbar-container">
        <Link to="/" className="navbar-logo">
            MRN <i className='fab fa-typo3'/>
            <div className="menu-icon">
            </div>
        </Link>
    </div>
  </nav>

CodePudding user response:

You should write it like this

Don't use classname

  • Related