Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About pailwriter

  • Rank
  1. Okay, thanks for the help. I may have to use a CSS pre-processor like Sass. Although, it would be nice if CSS could do this on its own. Maybe someday.
  2. I appreciate the response, but this answer only works if the "value" of "Open" is preset. (hard coded) I need to style the text when it is populated by the javascript code. There will be no hard coded value and that value of "Open" or "Closed" will change twice a day when the javascript code runs. Here is a better sample of the code I am working with. <! DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Text Color change 2</title> <style> .txtbx { border: 2px solid #000; width: 140px; height: 60px;
  3. Thanks for the reply. What happened to the idea of adding the "contains" option in CSS? I read about this and it seems it was dumped before it really had a good start. Is there anything that replaced it?
  4. I am having trouble understanding some CSS effects. For example; how can I change the font color based on a text box value? Here’s my scenario: On the HTML page: <div id=”dv1” class=”firstDiv”> <input type=”text” id=”tb1” class=”txtbx1” > </div> On the CSS page .txtbx1 { Color: red; } .txtbx1:has(“Open”) { Color: green; } I’ve tried “has” and “contains” but neither work. I also tried doing the change on the whole div, but that didn't work either. The value in the text box changes automatically (through some javascr
  • Create New...