NameSilo

Style select boxes

NamecheapNamecheap
Namecheap AuctionsNamecheap Auctions
Namecheap AuctionsNamecheap Auctions
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.
Unstoppable Domains โ€” AI StorefrontUnstoppable Domains โ€” AI Storefront
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
•••
Dynadot โ€” .com TransferDynadot โ€” .com Transfer
Truehost โ€” .com domains from $4.99, hosting includedTruehost โ€” .com domains from $4.99, hosting included
Escrow.com
Spaceship
CryptoExchange.com
Domain Recover
DomDB
NameFit
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back