I'm using unicode in a pseudo-element in my menu items, is it possible to remove it from the first menu item...











up vote
0
down vote

favorite












I'm using the unicode 25C6 for the black solid diamond in my menu as a spacer between labels. I used the before pseudo-element per a thread found here on Stack Overflow. I searched here for about an hour but what I'm looking to do I might not be searching for with the right wording.



I'm only using the out of box Twenty-Twelve theme from Wordpress with a child theme. I did find some other similar questions about removing particular menu item icons, but I haven't found one that works for me. I just want to remove or "display:none" the fist icon or the last if someone thinks ::after is better to use.



I have tried adding it to the .nav-menu li but that makes it clickable and possibly a problem. I hope I've add the link properly be to the site, apologies if not.



This is the site http://vangurubros.com/



This is what I've tried to get the unicode to work



.main-navigation ul.nav-menu ::before {
content: "25C6";
list-style: none;
font-size: 1.15em;
color: #cc8040;
margin: 0 20px 0 0px;
}

.nav-menu li ::before {display: none;}









share|improve this question




























    up vote
    0
    down vote

    favorite












    I'm using the unicode 25C6 for the black solid diamond in my menu as a spacer between labels. I used the before pseudo-element per a thread found here on Stack Overflow. I searched here for about an hour but what I'm looking to do I might not be searching for with the right wording.



    I'm only using the out of box Twenty-Twelve theme from Wordpress with a child theme. I did find some other similar questions about removing particular menu item icons, but I haven't found one that works for me. I just want to remove or "display:none" the fist icon or the last if someone thinks ::after is better to use.



    I have tried adding it to the .nav-menu li but that makes it clickable and possibly a problem. I hope I've add the link properly be to the site, apologies if not.



    This is the site http://vangurubros.com/



    This is what I've tried to get the unicode to work



    .main-navigation ul.nav-menu ::before {
    content: "25C6";
    list-style: none;
    font-size: 1.15em;
    color: #cc8040;
    margin: 0 20px 0 0px;
    }

    .nav-menu li ::before {display: none;}









    share|improve this question


























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I'm using the unicode 25C6 for the black solid diamond in my menu as a spacer between labels. I used the before pseudo-element per a thread found here on Stack Overflow. I searched here for about an hour but what I'm looking to do I might not be searching for with the right wording.



      I'm only using the out of box Twenty-Twelve theme from Wordpress with a child theme. I did find some other similar questions about removing particular menu item icons, but I haven't found one that works for me. I just want to remove or "display:none" the fist icon or the last if someone thinks ::after is better to use.



      I have tried adding it to the .nav-menu li but that makes it clickable and possibly a problem. I hope I've add the link properly be to the site, apologies if not.



      This is the site http://vangurubros.com/



      This is what I've tried to get the unicode to work



      .main-navigation ul.nav-menu ::before {
      content: "25C6";
      list-style: none;
      font-size: 1.15em;
      color: #cc8040;
      margin: 0 20px 0 0px;
      }

      .nav-menu li ::before {display: none;}









      share|improve this question















      I'm using the unicode 25C6 for the black solid diamond in my menu as a spacer between labels. I used the before pseudo-element per a thread found here on Stack Overflow. I searched here for about an hour but what I'm looking to do I might not be searching for with the right wording.



      I'm only using the out of box Twenty-Twelve theme from Wordpress with a child theme. I did find some other similar questions about removing particular menu item icons, but I haven't found one that works for me. I just want to remove or "display:none" the fist icon or the last if someone thinks ::after is better to use.



      I have tried adding it to the .nav-menu li but that makes it clickable and possibly a problem. I hope I've add the link properly be to the site, apologies if not.



      This is the site http://vangurubros.com/



      This is what I've tried to get the unicode to work



      .main-navigation ul.nav-menu ::before {
      content: "25C6";
      list-style: none;
      font-size: 1.15em;
      color: #cc8040;
      margin: 0 20px 0 0px;
      }

      .nav-menu li ::before {display: none;}






      css wordpress menu icons






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 17 at 4:30

























      asked Nov 17 at 4:24









      Deyo

      54




      54
























          2 Answers
          2






          active

          oldest

          votes

















          up vote
          1
          down vote



          accepted










          yes it is possible through css.



          Use :not(:first-child) pseudo element/class (whatever)






          ul.nav-menu li:not(:first-child)::before {
          content: "25C6";
          list-style: none;
          font-size: 1.15em;
          color: #cc8040;
          margin: 0 20px 0 0px;
          }
          ul li{display:inline-block;}

          <ul id="menu-amenu" class="nav-menu"><li id="menu-item-58" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-home current-menu-item page_item page-item-24 current_page_item menu-item-58"><a href="http://vangurubros.com/">Home</a></li>
          <li id="menu-item-56" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-56"><a href="http://vangurubros.com/media/">Media</a></li>
          <li id="menu-item-57" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-57"><a href="http://vangurubros.com/news/">News</a></li>
          <li id="menu-item-54" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-54"><a href="http://vangurubros.com/contact/">Contact</a></li>
          </ul>





          Try this






          share|improve this answer





















          • great, I will run this.
            – Deyo
            Nov 17 at 19:55










          • Have a good day :)
            – Viira
            yesterday


















          up vote
          0
          down vote













          You need to add code like this:



          .main-navigation ul.nav-menu li::before {
          content: "25C6";
          list-style: none;
          font-size: 1.15em;
          color: #cc8040;
          margin: 0 20px 0 0px;
          }
          .main-navigation ul.nav-menu li:first-child::before {
          display: none;
          }





          share|improve this answer








          New contributor




          Joykal Infotech is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.


















          • I would have marked both solutions answered as both work as needed perfectly, much appreciation.
            – Deyo
            Nov 17 at 19:54











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














           

          draft saved


          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53348196%2fim-using-unicode-in-a-pseudo-element-in-my-menu-items-is-it-possible-to-remove%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          2 Answers
          2






          active

          oldest

          votes








          2 Answers
          2






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          1
          down vote



          accepted










          yes it is possible through css.



          Use :not(:first-child) pseudo element/class (whatever)






          ul.nav-menu li:not(:first-child)::before {
          content: "25C6";
          list-style: none;
          font-size: 1.15em;
          color: #cc8040;
          margin: 0 20px 0 0px;
          }
          ul li{display:inline-block;}

          <ul id="menu-amenu" class="nav-menu"><li id="menu-item-58" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-home current-menu-item page_item page-item-24 current_page_item menu-item-58"><a href="http://vangurubros.com/">Home</a></li>
          <li id="menu-item-56" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-56"><a href="http://vangurubros.com/media/">Media</a></li>
          <li id="menu-item-57" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-57"><a href="http://vangurubros.com/news/">News</a></li>
          <li id="menu-item-54" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-54"><a href="http://vangurubros.com/contact/">Contact</a></li>
          </ul>





          Try this






          share|improve this answer





















          • great, I will run this.
            – Deyo
            Nov 17 at 19:55










          • Have a good day :)
            – Viira
            yesterday















          up vote
          1
          down vote



          accepted










          yes it is possible through css.



          Use :not(:first-child) pseudo element/class (whatever)






          ul.nav-menu li:not(:first-child)::before {
          content: "25C6";
          list-style: none;
          font-size: 1.15em;
          color: #cc8040;
          margin: 0 20px 0 0px;
          }
          ul li{display:inline-block;}

          <ul id="menu-amenu" class="nav-menu"><li id="menu-item-58" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-home current-menu-item page_item page-item-24 current_page_item menu-item-58"><a href="http://vangurubros.com/">Home</a></li>
          <li id="menu-item-56" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-56"><a href="http://vangurubros.com/media/">Media</a></li>
          <li id="menu-item-57" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-57"><a href="http://vangurubros.com/news/">News</a></li>
          <li id="menu-item-54" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-54"><a href="http://vangurubros.com/contact/">Contact</a></li>
          </ul>





          Try this






          share|improve this answer





















          • great, I will run this.
            – Deyo
            Nov 17 at 19:55










          • Have a good day :)
            – Viira
            yesterday













          up vote
          1
          down vote



          accepted







          up vote
          1
          down vote



          accepted






          yes it is possible through css.



          Use :not(:first-child) pseudo element/class (whatever)






          ul.nav-menu li:not(:first-child)::before {
          content: "25C6";
          list-style: none;
          font-size: 1.15em;
          color: #cc8040;
          margin: 0 20px 0 0px;
          }
          ul li{display:inline-block;}

          <ul id="menu-amenu" class="nav-menu"><li id="menu-item-58" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-home current-menu-item page_item page-item-24 current_page_item menu-item-58"><a href="http://vangurubros.com/">Home</a></li>
          <li id="menu-item-56" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-56"><a href="http://vangurubros.com/media/">Media</a></li>
          <li id="menu-item-57" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-57"><a href="http://vangurubros.com/news/">News</a></li>
          <li id="menu-item-54" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-54"><a href="http://vangurubros.com/contact/">Contact</a></li>
          </ul>





          Try this






          share|improve this answer












          yes it is possible through css.



          Use :not(:first-child) pseudo element/class (whatever)






          ul.nav-menu li:not(:first-child)::before {
          content: "25C6";
          list-style: none;
          font-size: 1.15em;
          color: #cc8040;
          margin: 0 20px 0 0px;
          }
          ul li{display:inline-block;}

          <ul id="menu-amenu" class="nav-menu"><li id="menu-item-58" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-home current-menu-item page_item page-item-24 current_page_item menu-item-58"><a href="http://vangurubros.com/">Home</a></li>
          <li id="menu-item-56" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-56"><a href="http://vangurubros.com/media/">Media</a></li>
          <li id="menu-item-57" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-57"><a href="http://vangurubros.com/news/">News</a></li>
          <li id="menu-item-54" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-54"><a href="http://vangurubros.com/contact/">Contact</a></li>
          </ul>





          Try this






          ul.nav-menu li:not(:first-child)::before {
          content: "25C6";
          list-style: none;
          font-size: 1.15em;
          color: #cc8040;
          margin: 0 20px 0 0px;
          }
          ul li{display:inline-block;}

          <ul id="menu-amenu" class="nav-menu"><li id="menu-item-58" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-home current-menu-item page_item page-item-24 current_page_item menu-item-58"><a href="http://vangurubros.com/">Home</a></li>
          <li id="menu-item-56" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-56"><a href="http://vangurubros.com/media/">Media</a></li>
          <li id="menu-item-57" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-57"><a href="http://vangurubros.com/news/">News</a></li>
          <li id="menu-item-54" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-54"><a href="http://vangurubros.com/contact/">Contact</a></li>
          </ul>





          ul.nav-menu li:not(:first-child)::before {
          content: "25C6";
          list-style: none;
          font-size: 1.15em;
          color: #cc8040;
          margin: 0 20px 0 0px;
          }
          ul li{display:inline-block;}

          <ul id="menu-amenu" class="nav-menu"><li id="menu-item-58" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-home current-menu-item page_item page-item-24 current_page_item menu-item-58"><a href="http://vangurubros.com/">Home</a></li>
          <li id="menu-item-56" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-56"><a href="http://vangurubros.com/media/">Media</a></li>
          <li id="menu-item-57" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-57"><a href="http://vangurubros.com/news/">News</a></li>
          <li id="menu-item-54" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-54"><a href="http://vangurubros.com/contact/">Contact</a></li>
          </ul>






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 17 at 5:29









          Viira

          1,290320




          1,290320












          • great, I will run this.
            – Deyo
            Nov 17 at 19:55










          • Have a good day :)
            – Viira
            yesterday


















          • great, I will run this.
            – Deyo
            Nov 17 at 19:55










          • Have a good day :)
            – Viira
            yesterday
















          great, I will run this.
          – Deyo
          Nov 17 at 19:55




          great, I will run this.
          – Deyo
          Nov 17 at 19:55












          Have a good day :)
          – Viira
          yesterday




          Have a good day :)
          – Viira
          yesterday












          up vote
          0
          down vote













          You need to add code like this:



          .main-navigation ul.nav-menu li::before {
          content: "25C6";
          list-style: none;
          font-size: 1.15em;
          color: #cc8040;
          margin: 0 20px 0 0px;
          }
          .main-navigation ul.nav-menu li:first-child::before {
          display: none;
          }





          share|improve this answer








          New contributor




          Joykal Infotech is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.


















          • I would have marked both solutions answered as both work as needed perfectly, much appreciation.
            – Deyo
            Nov 17 at 19:54















          up vote
          0
          down vote













          You need to add code like this:



          .main-navigation ul.nav-menu li::before {
          content: "25C6";
          list-style: none;
          font-size: 1.15em;
          color: #cc8040;
          margin: 0 20px 0 0px;
          }
          .main-navigation ul.nav-menu li:first-child::before {
          display: none;
          }





          share|improve this answer








          New contributor




          Joykal Infotech is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.


















          • I would have marked both solutions answered as both work as needed perfectly, much appreciation.
            – Deyo
            Nov 17 at 19:54













          up vote
          0
          down vote










          up vote
          0
          down vote









          You need to add code like this:



          .main-navigation ul.nav-menu li::before {
          content: "25C6";
          list-style: none;
          font-size: 1.15em;
          color: #cc8040;
          margin: 0 20px 0 0px;
          }
          .main-navigation ul.nav-menu li:first-child::before {
          display: none;
          }





          share|improve this answer








          New contributor




          Joykal Infotech is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.









          You need to add code like this:



          .main-navigation ul.nav-menu li::before {
          content: "25C6";
          list-style: none;
          font-size: 1.15em;
          color: #cc8040;
          margin: 0 20px 0 0px;
          }
          .main-navigation ul.nav-menu li:first-child::before {
          display: none;
          }






          share|improve this answer








          New contributor




          Joykal Infotech is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.









          share|improve this answer



          share|improve this answer






          New contributor




          Joykal Infotech is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.









          answered Nov 17 at 5:32









          Joykal Infotech

          1162




          1162




          New contributor




          Joykal Infotech is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.





          New contributor





          Joykal Infotech is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.






          Joykal Infotech is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.












          • I would have marked both solutions answered as both work as needed perfectly, much appreciation.
            – Deyo
            Nov 17 at 19:54


















          • I would have marked both solutions answered as both work as needed perfectly, much appreciation.
            – Deyo
            Nov 17 at 19:54
















          I would have marked both solutions answered as both work as needed perfectly, much appreciation.
          – Deyo
          Nov 17 at 19:54




          I would have marked both solutions answered as both work as needed perfectly, much appreciation.
          – Deyo
          Nov 17 at 19:54


















           

          draft saved


          draft discarded



















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53348196%2fim-using-unicode-in-a-pseudo-element-in-my-menu-items-is-it-possible-to-remove%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Paul Cézanne

          UIScrollView CustomStickyHeader Resize height generates problems when scroll is too fast

          Angular material date-picker (MatDatepicker) auto completes the date on focus out