Win a copy of TensorFlow 2.0 in Action this week in the Artificial Intelligence and Machine Learning forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

Manipulate Link Font Color

 
Ranch Hand
Posts: 2045
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would like this link to have black background and white text.

What the following give is black background with very dim text.



My CSS:

 
Marshal
Posts: 67463
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does DevTools show that the CSS being applied is what you expect?
 
Steve Dyke
Ranch Hand
Posts: 2045
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Bear Bibeault wrote:Does DevTools show that the CSS being applied is what you expect?



The link is in a chunk of JSON returned from a jqGrid callback.
I have tried to use the IE DevTools to inspect but I have not been able to find this bit of code.
 
Bear Bibeault
Marshal
Posts: 67463
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The link must exist in the DOM for it to be displayed, so finding the element in DevTools should be possible. The source code is irrelevant.
 
Steve Dyke
Ranch Hand
Posts: 2045
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Bear Bibeault wrote:The link must exist in the DOM for it to be displayed, so finding the element in DevTools should be possible. The source code is irrelevant.



Found it:

<td title="No Data" role="gridcell" aria- <br /> describedby="faicomponentlist_faistatus"><a title="Click to View <br /> Comments" class="blackBG help-pointer viewstatuscomments" href="#" <br /> data-actiontype="No Data" data-faicitemno="861364-003A">No Data
</td>

In the inspection it looks like a style called ui-widget and ui-state are overriding my style.

Even if I change to this is still will not work as desired:

 
Bear Bibeault
Marshal
Posts: 67463
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Avoid important unless it's the only way to go (sometimes unavoidable when using Bootstrap et al). You may need to increase the specificity of your rule.
 
Steve Dyke
Ranch Hand
Posts: 2045
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have changed the ‘a’ tags to ‘span’ and it works as desired.
 
Bear Bibeault
Marshal
Posts: 67463
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Changing the specificity rather than changing to a non-semantic element type would be the better approach.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic