Country flag images in combo box take forever to load

4 posts, 0 answers
  1. Chen
    Chen avatar
    46 posts
    Member since:
    Oct 2010

    Posted 14 Aug 2011 Link to this post

    Hi,
    I want to have a combo box for country flags, and have the ~240 countries listed with the ~240 flags.

    When I use the ImageURL attribute, the loading of 240 flags takes forever as only a couple of requests are sent concurrently.

    I have a sprite for flags, but cannot seem to separate the image from the text, i.e. if I use CSS and Background property, the text is placed on top of the flag.

    Is there a way for me to show the flags in a combo box from a sprite, and have the text to the right of the flag?

    Chen
  2. Steve
    Steve avatar
    1886 posts
    Member since:
    Dec 2008

    Posted 14 Aug 2011 Link to this post

    Have you tried padding-left:20px (or whatever) to move the text over away from the flag?
  3. Chen
    Chen avatar
    46 posts
    Member since:
    Oct 2010

    Posted 14 Aug 2011 Link to this post

    When I do that both the flag and text move.
    In HTML they are both <li> and any padding I apply is applied to all of the <li>.
  4. Steve
    Steve avatar
    1886 posts
    Member since:
    Dec 2008

    Posted 14 Aug 2011 Link to this post

    Hmm if done right, it SHOULDN'T :/

    Have a look at the attached image, I just quickly modified one of the demo pages

    So the image becomes the background of the <li> and when the padding is set the test should be pushed over too
Back to Top