I am getting caught early on by "The Steps for Modifying the Appearance of the Site", where I am told to modify color values in Site.css. After making the changes they asked for my code looks like this:
...however
only the 2nd "color" attribute applies. The first "background-color" attribute retains its original
5c87b2 color. Later on in the exercise I run into similar problems. I have tried restarting and refreshing the build before running it and there is no difference.
Sorry for the amateur hour question, but I can't find any answers to this very simple problem just by searching. Thanks.
If you create a new site from the Starter Site template, run it and then open Site.css in Webmatrix, modify the body background-color, save Site.css and refresh the site home page in the browser, I think you can see a new background color.
I have never used WebMatrix. So, with that disclaimer, if you are viewing the page in a browser then understand that the browser will always cache the css. It is just another text file to the browser. Always do a page refresh or F5 or Ctrl-F5 or all of
them whenever you change the css. Also, you cannot possibly diagnose this type of issue without using the developer tools that come with every major browser. Just hit f12 and the tools will open. Learn to use them.
Marked as answer by jacobavala on Apr 23, 2012 08:56 PM
jacobavala
0 Points
2 Posts
Beginner: Some style sheet colors won't apply
Apr 23, 2012 05:41 PM|LINK
I'm very new to this and just learning, but I've been trying to go through this tutorial:
http://msdn.microsoft.com/en-us/library/hh145667(v=vs.99).aspx
I am getting caught early on by "The Steps for Modifying the Appearance of the Site", where I am told to modify color values in Site.css. After making the changes they asked for my code looks like this:
body {
background-color: #669900;
font-size: .85em;
font-family: "Trebuchet MS", Verdana, Helvetica, Sans-Serif;
margin: 0;
padding: 0;
color: #006600;
}
...however only the 2nd "color" attribute applies. The first "background-color" attribute retains its original 5c87b2 color. Later on in the exercise I run into similar problems. I have tried restarting and refreshing the build before running it and there is no difference.
Sorry for the amateur hour question, but I can't find any answers to this very simple problem just by searching. Thanks.
rickjames961
Participant
775 Points
174 Posts
Re: Beginner: Some style sheet colors won't apply
Apr 23, 2012 05:44 PM|LINK
make sure that there is no styling applied inline to the body element. Styling applied inline will override what is in the css.
Friedrich Nietzsche
GmGregori
Contributor
5438 Points
730 Posts
Re: Beginner: Some style sheet colors won't apply
Apr 23, 2012 08:08 PM|LINK
Try starting from scratch.
If you create a new site from the Starter Site template, run it and then open Site.css in Webmatrix, modify the body background-color, save Site.css and refresh the site home page in the browser, I think you can see a new background color.
RichardY
Star
8376 Points
1573 Posts
Re: Beginner: Some style sheet colors won't apply
Apr 23, 2012 08:22 PM|LINK
I have never used WebMatrix. So, with that disclaimer, if you are viewing the page in a browser then understand that the browser will always cache the css. It is just another text file to the browser. Always do a page refresh or F5 or Ctrl-F5 or all of them whenever you change the css. Also, you cannot possibly diagnose this type of issue without using the developer tools that come with every major browser. Just hit f12 and the tools will open. Learn to use them.
jacobavala
0 Points
2 Posts
Re: Beginner: Some style sheet colors won't apply
Apr 23, 2012 08:37 PM|LINK
Running the page and hitting F5 did the trick, thanks. I appreciate everyone who looked at this issue.
RichardY
Star
8376 Points
1573 Posts
Re: Beginner: Some style sheet colors won't apply
Apr 23, 2012 08:52 PM|LINK
I'm glad you resolved your issue. Please mark as answered all post that helped you. Doing so helps other users of the forum. Good luck.
teguhyuliant...
Participant
1370 Points
372 Posts
Re: Beginner: Some style sheet colors won't apply
May 01, 2012 06:26 AM|LINK
You can learn each value appear, and try to changed and modify with another value. Hope this will help your problem.