...

View Full Version : styling text inputs



chrismiceli
11-24-2002, 03:06 AM
i am trying to style the color of an input type="text" only, not all inputs, how do i do it, i tried this to no avail

input:text {COLOR: #WHITE
}

Catman
11-24-2002, 04:04 AM
Try this:


input.text {
background-color : #333333;
color : #ffffff;
}

Then write your input element like this:


<input type="text" class="text" value="default" />

Your input box should be dark gray with white text with these settings.

jkd
11-24-2002, 04:09 AM
If IE/Windows didn't suck, you could do this (which is supported in Moz, Opera, Konqueror, and IE5/Mac):

input[type="text"] {
/* my styles */
}

Motif Webs
11-24-2002, 09:29 AM
How is doing it in LESS keystrokes using CSS mean that IE sucks? Talk about your prejudices blinding you.

Neil

redhead
11-24-2002, 01:07 PM
jkd is saying that IE doesnt support that method and that IE has much more limited CSS support than many other browsers.

and i wouldnt talk about his "predjudices" blinding him... nearer the point is the fact that we should be looking towards better standards...

jkd
11-24-2002, 07:37 PM
Originally posted by Motif Webs
How is doing it in LESS keystrokes using CSS mean that IE sucks? Talk about your prejudices blinding you.

Neil

It's only less keystrokes for one or two input elements. Once you get into any decent sized form, you'll find it is *much* easier to be able to select the input directly than having to hack around with adding a class to each and every one.

If every single other significant browser supports it, I fail to see why IE cannot provide it, let alone any substantial amount of CSS2 support.

chrismiceli
11-24-2002, 08:02 PM
i use mozilla on my computer w/ linux, but everyone i know uses ie, so i had to use the class="text" that annoyed me but you have to do what you have to do to get it cross browser, and ie does suck.:D

Motif Webs
11-25-2002, 03:18 AM
Originally posted by jkd


It's only less keystrokes for one or two input elements. Once you get into any decent sized form, you'll find it is *much* easier to be able to select the input directly than having to hack around with adding a class to each and every one.

If every single other significant browser supports it, I fail to see why IE cannot provide it, let alone any substantial amount of CSS2 support. Hmmm, interestingly enough if one went by the figures available ( http://www.upsdell.com/BrowserNews/stat.htm http://www.thecounter.com/stats/2002/November/browser.php http://www.w3schools.com/browsers/browsers_stats.asp ) there are only two significant browsers out there - IE 5 and 6. Or you could stretch it to include NS 4.xx and it doesn't even provide much in the way of CSS1 support let alone CSS2. :p

Personally, I find IE 6's support of CSS2 pretty good, but I realize that there are those around who aren't happy unless they can nitpick to the nth degree about anything from MS. I'd go so far as to suggest that if there wasn't anything wrong then they'd invent something just to keep their prejudices happy. C'est la vie.

It doesn't overly worry me as I use whichever I click on first IE 6, NS 7 or Opera 6, but just find it funny watching prejudice at work.

Neil

jkd
11-25-2002, 06:01 AM
Originally posted by Motif Webs
Personally, I find IE 6's support of CSS2 pretty good, but I realize that there are those around who aren't happy unless they can nitpick to the nth degree about anything from MS. I'd go so far as to suggest that if there wasn't anything wrong then they'd invent something just to keep their prejudices happy. C'est la vie.

No offense, but in order to say that in all honesty, you must have neglected to try anything useful in CSS2 that was added since CSS1. Attribute selectors, content generation, etc - significant portions of the spec that IE/Win simply neglects, but are among the most powerful portions too!

I would be escatic if Microsoft would get their act together and put out a browser than can compare. I have nothing against MS (I use WinXP more often than my dual-booted SuSE 8.0, and love MS Office), but I have a lot against bad software, such as IE.



It doesn't overly worry me as I use whichever I click on first IE 6, NS 7 or Opera 6, but just find it funny watching prejudice at work.

Neil

How is this prejudice? I simply demand a decent web development platform. Mozilla, Opera, and Konqueror all provide one. Even IE's Mac equivalent does. Am I not entitled to complain if IE/Win can't?

I hate IE/Win because it has retarded the future of web design. Maybe IE7 will fix this, or maybe not. But if you've ever tried developing something to powerful standards, you will realize exactly what the potential of the web is, only to get frustrated by IE/Win basically supporting nothing you just used.

Motif Webs
11-25-2002, 11:01 AM
Fair enuff and certainly I'll concede that your experience in developing powerful applications and large websites needing CMS far exceeds mine. I guess I'm just not sure that your approach/attitude is one that will best ensure improvements are made to IE's standards compliance. Nonetheless, we all have our own ways of approaching these little difficulties life presents us. :p

Neil



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum