473,409 Members | 1,954 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,409 software developers and data experts.

DropDownList with Icons.

Hello,

I was wondering if there was a way to include an icon in a dropdownlist. I
found one way, that is to set the background image of the 'option' to the
desired icon and then set the padding to sat 50px, which offsets the text
and makes it look as if the icon is appearing to the left of it.
Unfortunately this only works with firefox and not explorer.

Does anyone have any ideas on how I could acheive this with explorer ?
cheers
May 31 '08 #1
2 3357
On May 31, 7:02 pm, "Rain" <m...@myplace.comwrote:
Hello,

I was wondering if there was a way to include an icon in a dropdownlist. I
found one way, that is to set the background image of the 'option' to the
desired icon and then set the padding to sat 50px, which offsets the text
and makes it look as if the icon is appearing to the left of it.
Unfortunately this only works with firefox and not explorer.

Does anyone have any ideas on how I could acheive this with explorer ?

cheers
Hi

First of all you can mark the style as "!important" to make it highest
priority style.
or perhaps use a different approch to solve the problem
just put a div in inner html of the option's
<select>
<option><div style='width:50px;'>&nbsp;</div><span>Yahoo</
span></option>
<option><div style='width:50px;'>&nbsp;</div><span>Google</
span></option>
</select>

Best of luck

Munna
www.munna.shatkotha.com
www.munna.shatkotha.com/blog
www.shatkotha.com
Jun 1 '08 #2
Doesent work
"Munna" <mu******@gmail.comwrote in message
news:ab**********************************@a9g2000p rl.googlegroups.com...
On May 31, 7:02 pm, "Rain" <m...@myplace.comwrote:
>Hello,

I was wondering if there was a way to include an icon in a dropdownlist.
I
found one way, that is to set the background image of the 'option' to the
desired icon and then set the padding to sat 50px, which offsets the text
and makes it look as if the icon is appearing to the left of it.
Unfortunately this only works with firefox and not explorer.

Does anyone have any ideas on how I could acheive this with explorer ?

cheers

Hi

First of all you can mark the style as "!important" to make it highest
priority style.
or perhaps use a different approch to solve the problem
just put a div in inner html of the option's
<select>
<option><div style='width:50px;'>&nbsp;</div><span>Yahoo</
span></option>
<option><div style='width:50px;'>&nbsp;</div><span>Google</
span></option>
</select>

Best of luck

Munna
www.munna.shatkotha.com
www.munna.shatkotha.com/blog
www.shatkotha.com

Jun 1 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: drum118 | last post by:
Has anyone experience problems with firewall blocking some icons and not others. I am using Zone alarm and have the popup set for medium and it was blocking some of the icons for some strange...
24
by: Crom | last post by:
Ok. I want to settle this once and for all. After looking at the source for various, rather sizeable (but not all were so big) web sites that use icons that show up in the addressbar beside the...
3
by: sto | last post by:
look at this picture http://upload.cs99.net/e.gif i use the function SHGetFileInfo to get file icons. but these icons are not very nice. there are some black things round of the icons. many...
6
by: B-Dog | last post by:
Does anyone know where I can find some professional looking icons that are the standard windows collection for developers? The ones that came on the VS cd are pretty lame. Thanks
17
by: Brett | last post by:
I'd like references on where to find some good (quality) icons to use for form and application icons (for the EXE). Most of the free stuff isn't that great looking and there isn't a good...
2
by: SharpCoderMP | last post by:
i'm trying to embed multiple program icons in my executable. the only way so far i managed to do that is to embed native win32 resource file with multiple icons. it works, but... when i create a...
2
by: SF | last post by:
Hi, I am new to VB.NET. I try to start my first project linking to an Access database. On my Form1, I have two fields (bound), Subject and Author. This was done by draginf the table into the...
4
by: Sanoski | last post by:
This might be a dumb question. I don't know. I'm new to all this. How do you find icons for your programs? All GUI applications have cool icons that represent various things. For instance, to save...
2
by: Rain | last post by:
Hello, I was wondering if there was a way to include an icon in a dropdownlist. I found one way, that is to set the background image of the 'option' to the desired icon and then set the padding...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.