473,513 Members | 2,358 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3370
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
2421
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
3781
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
3182
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
2349
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
14659
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
3426
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
1645
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
2444
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
320
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
7553
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...
1
7120
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
7542
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
4754
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...
0
3247
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3235
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1609
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
809
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
466
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.