Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 10 of 10
  1. #1
    Regular Coder
    Join Date
    Sep 2002
    Location
    Louisiana
    Posts
    576
    Thanks
    0
    Thanked 0 Times in 0 Posts

    styling text inputs

    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
    }

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Location
    Ames, IA, USA
    Posts
    373
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Try this:
    Code:
    input.text {
      background-color : #333333;
      color : #ffffff;
      }
    Then write your input element like this:
    Code:
    <input type="text" class="text" value="default" />
    Your input box should be dark gray with white text with these settings.
    Need more emoticons?
    Visit Catman's Private Stock

  • #3
    jkd
    jkd is offline
    Senior Coder jkd's Avatar
    Join Date
    May 2002
    Location
    metro DC
    Posts
    3,163
    Thanks
    1
    Thanked 18 Times in 18 Posts
    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 */
    }

  • #4
    New Coder
    Join Date
    Nov 2002
    Posts
    28
    Thanks
    0
    Thanked 0 Times in 0 Posts
    How is doing it in LESS keystrokes using CSS mean that IE sucks? Talk about your prejudices blinding you.

    Neil

  • #5
    Regular Coder
    Join Date
    Jun 2002
    Location
    United Kingdom Confused: Often
    Posts
    859
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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...
    Last edited by redhead; 11-24-2002 at 01:11 PM.
    redhead

  • #6
    jkd
    jkd is offline
    Senior Coder jkd's Avatar
    Join Date
    May 2002
    Location
    metro DC
    Posts
    3,163
    Thanks
    1
    Thanked 18 Times in 18 Posts
    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.

  • #7
    Regular Coder
    Join Date
    Sep 2002
    Location
    Louisiana
    Posts
    576
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.

  • #8
    New Coder
    Join Date
    Nov 2002
    Posts
    28
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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...er/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.

    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

  • #9
    jkd
    jkd is offline
    Senior Coder jkd's Avatar
    Join Date
    May 2002
    Location
    metro DC
    Posts
    3,163
    Thanks
    1
    Thanked 18 Times in 18 Posts
    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.

  • #10
    New Coder
    Join Date
    Nov 2002
    Posts
    28
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.

    Neil


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •