Trouble with background-color | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Trouble with background-color

Hi all. I have just started learning html and seem to have gotten myself stuck. I have reached the part in the lessons where we start talking about adding color and for the most part I understand what's happening. However when I try to set a back ground color the tables I created in a previous lesson it it stops writing the color before it even reaches the color. https://code.sololearn.com/W042a12a0A16/# There's the link to my code. I realize its hard to look at but I've tried to include comments where I am having the issue. <div style="background-color: black; color:white; padding:20px;"> every which way and in every place I could think of even resorted to pasting it to khan academy to see if oh nos could tell me what was wrong...he was less than helpful I don't want the answer just a nudge in the right direction to get me back on track. Thanks in advanced.

9th Dec 2020, 1:25 PM
Alex Davis
Alex Davis - avatar
3 Answers
+ 4
Alex Davis 😊 actually instead of px u wrote x just And u want to give the style to the table so you have to give the style to table not to the div Anyway hope it helped!!
9th Dec 2020, 1:52 PM
Aastha
Aastha - avatar
9th Dec 2020, 1:35 PM
Aastha
Aastha - avatar
+ 1
Yes thats exactly what I'm trying to do. thank you so much I guess I should go back and redo that lesson because I though the div had to be between the commands I wa trying to alter
9th Dec 2020, 1:47 PM
Alex Davis
Alex Davis - avatar