Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS How to Make a Website CSS: Cascading Style Sheets Center the Wrapper

Hassan Kamal
PLUS
Hassan Kamal
Courses Plus Student 1,879 Points

My background color won't turn to orange along with the underline hyper text is not underlined in Chrome. whereas

My background color won't turn to orange along with the underline hyper text is not underlined in Chrome. whereas it displays absolutely fine in Internet explorer-8 and Firefox 33.1.1

I dont know what's wrong with Chrome as it was displaying the background color at first but when refreshed it wouldn't show. :(

Firefox = http://snag.gy/L5xXq.jpg

Chrome = http://snag.gy/LaZzG.jpg

IE = http://snag.gy/10OrP.jpg

below is my HTML code.

'<html> <head> <meta charset="utf-8"> <title>Hassan Kamal | Designer</title> <link rel="stylesheet" href="css/normalize.css"> <link rel="stylesheet" href="css/main.css"> </head> <body> <header> <a href="index.html"> <h1>Hassan Kamal</h1> <h2>Designer</h2> </a>
<nav> <ul> <li><a href="index.html">Portfolio</a></li> <li><a href="about.html">About</a></li> <li><a href="contact.html">contact</a></li> </ul> </nav> </header>

  <section>
    <ul>
      <li>
        <a href="img/numbers-01.jpg">
          <img src="img/numbers-01.jpg" alt="">
          <p>Experimentation with color and texture.</p>
         </a>
      </li>
      <li>
        <a href="img/numbers-02.jpg">
          <img src="img/numbers-02.jpg" alt="">
          <p>Playing with blending mode with Photoshop.</p>
         </a>
      </li>
      <li>
        <a href="img/numbers-06.jpg">
          <img src="img/numbers-06.jpg" alt="">
          <p>80 style.</p>
         </a>
      </li>
      <li>
        <a href="img/numbers-09.jpg">
          <img src="img/numbers-09.jpg" alt="">
          <p>Using Photoshop.</p>
         </a>
      </li>
      <li>
        <a href="img/numbers-12.jpg">
          <img src="img/numbers-12.jpg" alt="">
          <p>Shape Using Repitation.</p>
         </a>
      </li>
    </ul>
  </section>
<footer>
    <a href="http://twitter.com/nickrp"><img src="img/twitter-wrap.png" alt="Twitter Logo"></a>
    <a href="http://facebook.com/hassankamal"><img src="img/facebook-wrap.png" alt="Facebook Logo"></a>
    <p>&copy; 2014 Hassan Kamal.</p>
</footer>

</body>
</html>

and this is the CSS

body { background-color: orange; }

Hassan Kamal
Hassan Kamal
Courses Plus Student 1,879 Points

ooh i just found out what the problem was, its workspaces although i press Ctrl + S (save) but it takes time to update the file on its server, not sure how it works but i guess its workspace. :)

2 Answers

ahla mr hassan kamal

you have nothing problems , please check if you add other css for background-color .

note : do not forget to add <!doctype html> .

i hope you understand me .

Lewis Pratt
Lewis Pratt
6,065 Points

Have you looked in the chrome developer tool to see if the C S is being applied?

Hassan Kamal
Hassan Kamal
Courses Plus Student 1,879 Points

Thanks Lewis, no i haven't but i just refreshed it once again and this time its working fine. strange :/.

Lewis Pratt
Lewis Pratt
6,065 Points

it may have been something to do with caching. The old css file may have been chached, meaning that the new styles weren't even be applied. glad it's sorted. for future reference, i'd clear your browsing data (cache mainly) if you have a similar issue in the future.