• I want to add a language flag image before the language name in a select dropdown. My first attemp is simply:

    <select id="lanslect" onchange="window.location.href=this.value" style="width:100%;>
    <option style="background: url(https://muzzyschools.com/wp-content/uploads/2017/10/english-uk.png) 70px 5px no-repeat ;" value="#top">ENGLISH UK</option>
    </select>

    but it doesn’t seem to work in Chrome and neither could find a simple plugin to achieve this. Any ideas or suggestions?
    Thank you in advance!
    Darío O. Fernández

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Before we dive into this, can you tell how do you create that dropdown menu for the language?
    There are many possible solutions, but probably with more details we could narrow it down to a simple css injection.
    There are tons of solutions out there, but not all might be good for you:

    https://codepen.io/brapastor/pen/BWyomB

    • This reply was modified 7 years, 4 months ago by Giorgio25b. Reason: Add resource link
    Thread Starter Darío Orlando Fernández

    (@soykatorce)

    Decided to use PopUp Maker because this is my first multi-language site and – Oh Gosh!- so many issues to solve. My learning curve got shugerred.
    – Detect locale
    – Set url home depending on locale
    – Customize background for different language versions of a same page
    – Where to write Java scripts and how to call them in HTML

    Will start threads for each of the above. This topic solved and closed. Thanx Giorgio.

    Cheers,
    Dario

    Hey Dario,
    first good luck with this new line of work, second it’s not so hard!
    The first 2 points are normally out-of-the-box with Poly-lang plugin.
    Different backgrounds seems to me a simple php case/break structure.
    I can help you with the setup of a simple js enqueue into your child-theme:
    WP Snippets

    Bye for now

    • This reply was modified 7 years, 3 months ago by Giorgio25b. Reason: Add resource link
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Select dropdown with IMAGE option’ is closed to new replies.