Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove or hide the google icon from the google translate api?

I am using this line of code:

    <div id="google_translate_element"></div>
<script>
   function googleTranslateElementInit() {
      var translator = new google.translate.TranslateElement({
      pageLanguage: 'en',
      autoDisplay: false,
      multilanguagePage: false,
      layout: google.translate.TranslateElement.InlineLayout.SIMPLE
   }, 'google_translate_element');
}
</script>
<script src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>

Here is the output and I want to remove the icon, how can possibly remove it? or hide

enter image description here

like image 206
GrayFullBuster Avatar asked Jan 15 '23 20:01

GrayFullBuster


2 Answers

Used to this

.goog-te-gadget-icon{
background:none !important;
}

Live Demo

like image 109
Rohit Azad Malik Avatar answered Jan 17 '23 09:01

Rohit Azad Malik


This is much better than rohit's answer

.goog-te-gadget-icon{
  display:none;
}
like image 26
Hammad Anwer Avatar answered Jan 17 '23 10:01

Hammad Anwer