Dynadot โ€” .com Registration $8.99

Style select boxes

Spaceship Spaceship
Watch

Something Vague

Established Member
Impact
9
I have a css sheet;

PHP:
.textbox {
	background-image: url(images/entryfield.jpg);
	border: 0px solid #184578;
	width: 90%;
	color: #65782f;
	font: 12px arial, sans-serif;
	font-weight: bold;
	text-align: center;
	padding: 2px;
}

Using this style works in text fields perfectly! However, when I use it with select fields, only the background-image: does not appear to be working.

To see what I mean, mxtext.com!

thanks
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
AfternicAfternic
Sorry to disappoint you ChrisW, but i'm pretty sure background images on select boxes are impossible.
 
0
•••
Oh no! This is a disapointment actually! :(
 
0
•••
Never fear, for there is always a way around things. The alternative is to code a nifty CSS menu drop down type thing that mimics a select box. Or JavaScript equivalent, but as far as I remember they normally work in IE only.

Saying that, I looked at mxtext.com (again) :) and I think you could get away with just using a lightgreen background color, it would still fit in well enough.
 
0
•••
Cheers, Shorty!

I will try that! Will post results, and I think you're right, that should suffice!

Placing

.selectbox {
background-color:#009900
border: 0px solid #184578;
width: 90%;
color: #65782f;
font: 12px arial, sans-serif;
font-weight: bold;
text-align: center;
padding: 2px;

as my new css, I do not see the background-color either :(
 
0
•••
That would probably be because you omitted a ; after the background-color. ;)

But good luck with the CSS menu thing, I find them a little tricky myself.
 
0
•••
Unstoppable Domains
Domain Recover
NameMaxi - Your Domain Has Buyers
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back