Solved

remove the arrow on a dropdown list

Posted on 2010-11-17
10
2,192 Views
Last Modified: 2012-05-10
Hi Experts

I would like to dispay a background image in place of a dropdown list, it kind of works but ...

I set the background image for the dropdown and removed the border from the dropdown list, . just need to get rid of the ugly dropdown arrow, can this be done in css?
0
Comment
Question by:cycledude
10 Comments
 
LVL 4

Expert Comment

by:claracruz
ID: 34155313
Doubtful in CSS only., this I have never seen...

But using JavaScript you can, now that, I have seen done
1
 
LVL 9

Expert Comment

by:TonyReba
ID: 34155387
The only way I can think of is using using  ajax  and a simple textbox , not a dropdown control.. see this samples , hope it helps

http://www.asp.net/ajax/ajaxcontroltoolkit/samples/

0
 

Author Comment

by:cycledude
ID: 34155524
@claracruz

If you could supply some more details that would be great!
0
 
LVL 4

Accepted Solution

by:
claracruz earned 500 total points
ID: 34157119
Well essentially, what you need to do is this;

1. you would have to check for select dropdown controls on page load and hide them.

2. Then create a span in its place. Then style the span to look like what you wanted with your dropdown.

3. Then create div with given dimensions to house the dropdown list options

4 Then when an option is selected in the div, you set the value to the span


If is worth the trouble, the results can be awesome.

It is done to outstanding results here;-

http://www.nuon.com/info_center/result.jsp?xslLocation=tcm%3A185-58710&actionUrl=%2Finfo_center%2Fresult.jsp&startPageUrl=%2Finfo_center%2Findex.jsp&infocentre=tcm%3A185-58892&searchString=Search&submit=Zoeken
0
 
LVL 4

Expert Comment

by:claracruz
ID: 34157367
And you can take it one step further and customize the div scrollbars if u wanted...

see here-

http://13thparallel.com/archive/dhtml-scrollbars/example.htm tutorial (http://13thparallel.com/archive/dhtml-scrollbars/)
0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 

Author Comment

by:cycledude
ID: 34158794
Hi Claracruz

Thanks for the links... very good.   Really all I want to do is hide the dropdown arrow, the background image has the right look and the functionality is there with the dropdown, I just have this horrid blue rectangle with a down arrow over the top of my image... eek!
0
 
LVL 4

Expert Comment

by:claracruz
ID: 34160032
Yeah.. there's is no provision to my knowledge that would facilitate that I'm afraid. I'm fairly certain it not possible.
0
 
LVL 44

Expert Comment

by:scrathcyboy
ID: 34160486
A drop-down list REQUIRES the down arrow.  If you remove it, how is anyone going to know it is a drop down list?  And to see the drop down list, they click on the arrow?  So no, it can't be removed because it tells the user that this is a drop down list !!
0
 

Author Comment

by:cycledude
ID: 34162376
@scrathcyboy

I know that a dropdown needs an arrow, my background image has it there, I just dont want the default arrow showing over the top.

If this can't be done then I will have to go down the jQuery route, but it's frustrating that we can't just set the arrow to display: none; or something
0
 

Author Comment

by:cycledude
ID: 34171130
hmm... it seems that only firefox show the background image!
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
In this tutorial viewers will learn how to define a gradient in CSS. Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Gradient. Define the background as "linear-gradient(to right, #ee3668, black)". Ensure you …
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now