0

Hello I am creating a website and I can't here is my code:

body { font-family: "Segoe UI", Tahoma, sans-serif; font-size: 18px; background-color: ffffff; overflow: auto; }
<body> <div class="main"> <img src=images\cat.gif></img> <table class="table"> <tr> <th style="text-align:left;"> <p id="output"><b>Likes: 0</b> </p> </th> <th style="text-align:right;"> <button class="button" onclick="likeButton()">Like</button> </th> </tr> </table> <script src="script.js"></script> </div> </body>

I have now idea what is wrong all of the guides I've seen have fixed syntax errors but I've triple checked and I am almost sure I don't have any plus on other documents I have the same issue. I may just be bad. Thanks...

4
  • 3
    use # before fff (#fff) Commented Aug 29, 2016 at 10:33
  • 2
    as @Friend stated you need to use # before hex colors as you are obviously trying to use hex colors here. Commented Aug 29, 2016 at 10:34
  • 3
    you have missed a # before ffffff Commented Aug 29, 2016 at 10:34
  • 1
    This is a question to close as typographycal error (offtopic on stackoverflow). Why 9 answers? Not neccessary. # is basic html/css development. Commented Aug 29, 2016 at 11:38

10 Answers 10

3
 body { font-family: "Segoe UI",Tahoma,sans-serif; font-size: 18px; background-color: #ffffff; overflow: auto; } 

Try This

Sign up to request clarification or add additional context in comments.

1 Comment

While this code snippet may solve the question, including an explanation really helps to improve the quality of your post. Remember that you are answering the question for readers in the future, and those people might not know the reasons for your code suggestion. Please also try not to crowd your code with explanatory comments, as this reduces the readability of both the code and the explanations!
2

in body css , there's missing #(hash) symbol before color code,
below code may work.

 body { font-family: "Segoe UI",Tahoma,sans-serif; font-size: 18px; background-color: #ffffff; overflow: auto; } 

here is jsfiddle link , you can check here too, it's working jsfiddle

and reason behind image not displaying is that , you did not double quote src value. like src="images\cat.gif"

Comments

2
body { font-family: "Segoe UI",Tahoma,sans-serif; font-size: 18px; background-color: #ffffff; overflow: auto; } 

First You Learn Css

if you forgot to put # symbol in front of color code,css does not apply to it ,and #ffffff color RGB value is (255,255,255). This hex color code is also a web safe color which is equal to #FFF. #ffffff color name is White color.

3 Comments

to give good answer, mention why he did not get proper result, and explain code if possible
that is why i have given the answer , or you giving a suggestion or asking the question to me MR.yash ..if So ,he has removed # symbol in front of color code,css does't apply it ,and #ffffff color RGB value is (255,255,255). This hex color code is also a web safe color which is equal to #FFF. #ffffff color name is White color. ,if you know more than this kindly explain ,,,!!!i will also learn from you !
whatever you written in previous comment, better if you edit add it in your answer.
1

CSS changes:

 body { background-color:#ffffff; } 

Comments

1

'#' is missing in your code. If you setting background-color anywhere else use '!important'

body { font-family: "Segoe UI",Tahoma,sans-serif; font-size: 18px; background-color: #ffffff !important; overflow: auto; } 

Comments

1

As #FFFFFF is white color. so you will not see it so change color and check

body { font-family: "Segoe UI",Tahoma,sans-serif; font-size: 18px; background-color: #FF0000; overflow: auto; }
<body> <div class="main"> <img src=images\cat.gif></img> <table class="table"> <tr> <th style="text-align:left;"><p id="output"><b>Likes: 0</b> </p></th> <th style="text-align:right;"><button class="button" onclick="likeButton()">Like</button></th> </tr> </table> <script src="script.js"></script> </div> </body>

Comments

1

You have missed # in background-color: ffffff; correct it by adding # like

background-color: #ffffff;

white is by default background color of browser. you can test it by changing with #ffbf00, #4000ff etc

Recommended read it from here

Comments

1

There is no compulsory rule to put # symbol before on color .In this, Kane's code is correct.But background-color: ffffff;return white color.ie.ffffff means white color. So we can not find any background in the website.If you have any doubt you change your background -color as background-color: FF0000; then you can clear your doubt.

Comments

1

First thing write "#" in front of background color code. eg:#ffffff Second thing #ffffff this color code is for white color if want see the difference, please change this color code to #FF0000

body { font-family: "Segoe UI",Tahoma,sans-serif; font-size: 18px; background-color: #ffffff; // white color please replace this to "#FF0000" inoder to see the difference overflow: auto; } 

Comments

0

You have to delete </img> and add " in src Please have a look to this: code

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.