Hi everyone how can we add country flags images to a webpage uisng css or some simple library.

Hi everyone how can we add country flags images to a webpage uisng css or some simple library.

Muhammad Ali Rafique

HI Alijan! You can use Flag sprite.

  • In configure option choose your suitable option like i chose "GoSquared large 32x32" then click on blue colored "Generate Flag sprites" Button.
  • Download the zip throught download zip button or right click and save spite image which contains images for all countries and save as flags.png

  • Copy css from the above field and save as flags.css

  • download or create 1x1 transparent image and save it a sblank.gif

  • use code like below to use images
<img src="blank.gif" class="flag flag-cz" alt="Czech Republic" />
    • Note here second class defines which country imae should be displayed. for example if you wana display United States image "use flag flag-us". you can see all country codes at flag-sprites

Regards Alijan

HI Alijan! You can use [Flag sprite](https://www.flag-sprites.com/en_US/ "Flag sprite"). - In configure option choose your suitable option like i chose "**GoSquared large 32x32**" then click on blue colored "**Generate Flag sprites**" Button. - Download the zip throught download zip button or right click and save spite image which contains images for all countries and save as flags.png - Copy css from the above field and save as flags.css - download or create 1x1 transparent image and save it a sblank.gif - use code like below to use images ```` <img src="blank.gif" class="flag flag-cz" alt="Czech Republic" /> ```` - - Note here second class defines which country imae should be displayed. for example if you wana display United States image "**use flag flag-us**". you can see all country codes at [flag-sprites](https://www.flag-sprites.com/en_US/ "flag-sprites") Regards **[Alijan](https://fiverr.com/ibnemuhammad "Alijan") **
edited Aug 27 '16 at 7:39 am
60
views
1
replies
2
followers
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft