+ 1

Change Text color to White if Background is #007AFE

I want to do that in my About Me Code. (function for changing bgcolor is under //Background Color Flow)

6th Oct 2022, 2:24 PM
Antony Blem
Antony Blem - avatar
13 Answers
9th Oct 2022, 5:44 PM
Antony Blem
Antony Blem - avatar
7th Oct 2022, 7:02 PM
Usman Shinwari🦂
Usman Shinwari🦂 - avatar
0
div class = "bgcolor" div Css .bgcolor{ background-color: blue; }
6th Oct 2022, 3:16 PM
ASR
ASR - avatar
0
ASR I mean IF the Bgcolor is #… THEN
6th Oct 2022, 6:28 PM
Antony Blem
Antony Blem - avatar
0
Lets see your attempt
7th Oct 2022, 4:47 AM
Chris Coder
Chris Coder - avatar
7th Oct 2022, 5:14 AM
Antony Blem
Antony Blem - avatar
0
I want to see your try.
7th Oct 2022, 5:46 AM
Chris Coder
Chris Coder - avatar
0
Chris Coder I have no try, because I don‘t know how to do it!
7th Oct 2022, 12:35 PM
Antony Blem
Antony Blem - avatar
0
Then show your "About me" code, via a code bit. Then tell us what part of the code you want to change color. That way we have something to work with. Thanks
7th Oct 2022, 2:40 PM
Chris Coder
Chris Coder - avatar
0
Sorry Chris Coder, I‘ve forgotten to do this in the Question: https://code.sololearn.com/WG93AxdEbCEz/?ref=app
7th Oct 2022, 3:23 PM
Antony Blem
Antony Blem - avatar
0
Usman Shinwari🦂 that is almost that, what I want, but it has to be automatic and if the colour isn‘t blue the text has to be black again
8th Oct 2022, 6:09 AM
Antony Blem
Antony Blem - avatar
0
Usman Shinwari🦂 what is the problem to check if the bgcolor is blue to make the text white and if the bgcolor is not blue set the text color to black
8th Oct 2022, 10:57 AM
Antony Blem
Antony Blem - avatar
0
If (document.querySelector("div").style.background == "#007AFE"){ // your code } else { }
26th Oct 2022, 2:45 PM
Nasimjon Rahmatov
Nasimjon Rahmatov - avatar