473,672 Members | 2,745 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 3383
On May 31, 7:02 pm, "Rain" <m...@myplace.c omwrote:
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:50 px;'>&nbsp;</div><span>Yahoo </
span></option>
<option><div style='width:50 px;'>&nbsp;</div><span>Googl e</
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******** *************** ***********@a9g 2000prl.googleg roups.com...
On May 31, 7:02 pm, "Rain" <m...@myplace.c omwrote:
>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.
Unfortunatel y 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:50 px;'>&nbsp;</div><span>Yahoo </
span></option>
<option><div style='width:50 px;'>&nbsp;</div><span>Googl e</
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
2428
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 reason that I have not seen before. Any reason why they are been blocked as well not showing up on view source as I am at a lost?
24
3803
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 address itself. Just about all websites that use said icons use one of these two methods (some use both even) to make them appear (in the code of a webpage.) : <LINK REL="icon" HREF="/icon.ico" TYPE="image/ico"> <LINK REL="SHORTCUT ICON"...
3
3185
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 applications use system icons for files. how did their programmers solve this problem in these apps?
6
2360
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
14675
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 selection. A site offering previews of icons or purchase of a single icon would be nice. Thanks, Brett
2
3435
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 native win32 resource file with the VS 2005 and put there my icons, VS always converts some of the 32bit icons into 24bit - so i loose alpha blending what makes my icons look ugly. I did an experiment and created a icon file with full range of...
2
1648
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 form. Since the author name are mostly the same, I want to change this field to a dropdownlist but I do not know how!. In Access, I just right click the field and select Change To Combo Box Could someone advice?
4
2452
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 is often represented as a disk, etc. You know, the small little picture references that give meaning to the phrase 'Graphical User Interface'. But I'm not a graphics artist! Drawing is simply one talent that skipped me completely. Where can I...
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 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 ?
0
8428
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8652
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8704
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7484
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6264
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5727
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2849
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 we have to send another system
2
2104
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
1851
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.