 |
BOOK: Beginning HTML and CSS (published March 2013)
 | This is the forum to discuss the Wrox book Beginning HTML and CSS by Rob Larsen; ISBN: 978-1-1183-4018-9 |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the BOOK: Beginning HTML and CSS (published March 2013) section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

September 25th, 2013, 01:22 AM
|
|
Registered User
|
|
Join Date: Sep 2013
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Styling Text on Chapter 7
This:
#navigation a {
color: #3399cc;
text-decoration: none;
}
doesn't seem to be working at all. It doesn't seem to get selected. The links are still underlined as usual.
|
|

September 25th, 2013, 08:11 AM
|
|
Wrox Author
|
|
Join Date: Apr 2012
Posts: 19
Thanks: 0
Thanked 3 Times in 3 Posts
|
|
Can you show me the HTML you're trying to apply it to?
|
|

September 25th, 2013, 09:16 AM
|
|
Registered User
|
|
Join Date: Sep 2013
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
<nav id="navigation">
HOME
<a href="menu.html">MENU</a>
<a href="recipes.html">RECIPES</a>
<a href="opening.html">OPENING</a>
<a href="contact.html">CONTACT</a>
</nav>
|
|

September 25th, 2013, 09:20 AM
|
|
Wrox Author
|
|
Join Date: Apr 2012
Posts: 19
Thanks: 0
Thanked 3 Times in 3 Posts
|
|
That should work. Unless the style sheet isn't attached to the document, that's all you would need. There is an example of that code working in the code downloads, so you can compare what you've done to that.
|
|

September 25th, 2013, 09:49 AM
|
|
Registered User
|
|
Join Date: Sep 2013
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Nope, doesn't work. I even copied the html and css code over from your sample_application_one and inserted it into my code. It works in your code but not mine for some reason.
I copied the html and css code snippets to a new html file and it works.
Last edited by thuyhoang; September 25th, 2013 at 10:01 AM..
|
|

September 25th, 2013, 10:03 AM
|
|
Wrox Author
|
|
Join Date: Apr 2012
Posts: 19
Thanks: 0
Thanked 3 Times in 3 Posts
|
|
If it works in the example code and not in your version, it's not an issue with your browser or with the technical aspects of the code. You've got a bug somewhere in your implementation. A big part of programming is finding out where the bugs are. The good news for you is that you can compare a working example with one that isn't working.
What browser are you using to test?
|
|

September 25th, 2013, 10:12 AM
|
|
Registered User
|
|
Join Date: Sep 2013
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I'm using Chrome.
|
|

September 25th, 2013, 10:21 AM
|
|
Wrox Author
|
|
Join Date: Apr 2012
Posts: 19
Thanks: 0
Thanked 3 Times in 3 Posts
|
|
So if you hit F12 and then right click on the menu you're trying to style, you can click "inspect element" which will open the developer tools with that element selected. It will tell you, in the right hand pane, where it's styles are being inherited from.
You can also look at the the Network tab to see if the style sheet is being properly loaded. There's a lot there that can help you figure out what's wrong with your implementation.
|
|

September 25th, 2013, 05:08 PM
|
|
Registered User
|
|
Join Date: Sep 2013
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
The only difference I see using F12 is that there are quotes around the HOME word. Like this:
Code:
<nav id="navigation">
" HOME "
<a href="menu.html">MENU</a>
<a href="recipes.html">RECIPES</a>
<a href="opening.html">OPENING</a>
<a href="contact.html">CONTACT</a>
</nav>
Quote:
Originally Posted by roblarsen
So if you hit F12 and then right click on the menu you're trying to style, you can click "inspect element" which will open the developer tools with that element selected. It will tell you, in the right hand pane, where it's styles are being inherited from.
You can also look at the the Network tab to see if the style sheet is being properly loaded. There's a lot there that can help you figure out what's wrong with your implementation.
|
|
|

September 25th, 2013, 08:35 PM
|
|
Wrox Author
|
|
Join Date: Apr 2012
Posts: 19
Thanks: 0
Thanked 3 Times in 3 Posts
|
|
What does the rest of your HTML file look like?
|
Similar Threads
|
| Thread |
Thread Starter |
Forum |
Replies |
Last Post |
| listview styling |
robbaralla |
BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 |
8 |
February 22nd, 2010 06:54 AM |
| C# Word Styling Automation |
rangeshram |
C# 2005 |
0 |
April 15th, 2009 01:51 AM |
| Styling the Menu Control |
stephenf |
BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 |
7 |
March 17th, 2009 02:41 PM |
| PHP Styling |
adaniels11 |
PHP How-To |
1 |
April 10th, 2007 05:10 AM |
| XSLT and styling |
jacob |
XSLT |
4 |
October 13th, 2005 02:50 AM |
|
 |
|