Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

using a graphic for a select box?

Status
Not open for further replies.

DaRNCaT

Technical User
Dec 18, 2002
566
NZ
I'm designing a shooping cart portal, and the overall design depends alot on drop down select menus- which will be database driven.
I have messed with css till I'm going cross eyed, but I can't get the select boxes to look any different, can I use a graphic image instead?

If anyone knows some way around the ugly as select boxes- please let me know- even if it means doing it some other way.

I'm not programming the PHP side of the cart just the design, so if it's technical I will just give the file to the programmer.
Sometimes, when my code just won't behave, I take it outside and make it listen to britney spears music, and when it comes back it's really well behaved. I wonder if it's suffering from post tramatic stress syndrome now..
 
You could use images and make it like a dropdown menu. Then onClick for the images would be setting values of hidden from elements. What exactly are you trying to do? Most things cannot be changed in CSS, but some can.

Rick -----------------------------------------------------------
 
I'm making a quick search box for a shopping cart, and at the bottom of the page I want a full search- the categories need to be in drop boxes, so the user can select what they want and hit "go" to run the search. I don't really want javascript drop menus, as it reduces the accessability, and this site may well be used by the disabled.

The big problem I'm having is that although I can make everything else look nice and fit the look and feel of the site, the select dropboxes look silly, and I was hoping there was some way to replace the standard look with a graphic of some sort(the way you can with buttons)- or another way to do it which could be used by a database. Sometimes, when my code just won't behave, I take it outside and make it listen to britney spears music, and when it comes back it's really well behaved. I wonder if it's suffering from post tramatic stress syndrome now..
 
You could probably alter some code from a menu script to set the hidden fields mentioned by RISTMO. This way the majority of the script is already written for you and you just have to make a one item menu that drops down with the correct selections. The alterations would be minor as all your really need to do is supply it with a little javascript to change the value of your hidden field (ie, use the javascript: instead of a URL for the menu items in the drop down.) So basically you wouldn't even need to edit the script, just set it up correctly.

Did that make sense? Post back if it didn't, I think I may have confused even myself at some point in there. :p

-Tarwn ________________________________________________________________________________
Want to get great answers to your Tek-Tips questions? Have a look at faq333-2924
 
yeah I guess that has posibilities- I was hoping for something non javascrit though. I assume that javascript and PHP can be integrated- I'll have to talk to the poor programmer *grin*, I'm glad that parts not my problem Sometimes, when my code just won't behave, I take it outside and make it listen to britney spears music, and when it comes back it's really well behaved. I wonder if it's suffering from post tramatic stress syndrome now..
 
Well, PHP is server-side and javascript would be client-side so there shouldn't be any issue integrating the two, except that I just made some poor progranmmer somewhere have a much longer monday :p

-Tarwn ________________________________________________________________________________
Want to get great answers to your Tek-Tips questions? Have a look at faq333-2924
 
You said that you couldn't get the select boxes to look different with CSS? Why can't you?

Try this:

<style>
.inputBox {
background-color: #E0EEEE;
border: 1px solid #607B8B;
font-family: Verdana;
font-weight: normal;
width: 190px;
font-size: 11px;
color: #000000;
}
</style>

with this:

<select class=&quot;inputBox&quot;>
<option>something...</option>
</select>
 
Nice, thanks- anyway to make the drop arrow a different color? I've tried messing with the browser scrollbars- which normally changes the internal scrollbars, but it didn't effect it. Sometimes, when my code just won't behave, I take it outside and make it listen to britney spears music, and when it comes back it's really well behaved. I wonder if it's suffering from post tramatic stress syndrome now..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top