Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old September 25th, 2013, 02:22 AM
Registered User
Points: 30, Level: 1
Points: 30, Level: 1 Points: 30, Level: 1 Points: 30, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2013
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Talking 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.
Reply With Quote
  #2 (permalink)  
Old September 25th, 2013, 09:11 AM
Wrox Author
Points: 93, Level: 1
Points: 93, Level: 1 Points: 93, Level: 1 Points: 93, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2012
Posts: 19
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Can you show me the HTML you're trying to apply it to?
Reply With Quote
  #3 (permalink)  
Old September 25th, 2013, 10:16 AM
Registered User
Points: 30, Level: 1
Points: 30, Level: 1 Points: 30, Level: 1 Points: 30, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2013
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Talking

<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>
Reply With Quote
  #4 (permalink)  
Old September 25th, 2013, 10:20 AM
Wrox Author
Points: 93, Level: 1
Points: 93, Level: 1 Points: 93, Level: 1 Points: 93, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2012
Posts: 19
Thanks: 0
Thanked 3 Times in 3 Posts
Default

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.
Reply With Quote
  #5 (permalink)  
Old September 25th, 2013, 10:49 AM
Registered User
Points: 30, Level: 1
Points: 30, Level: 1 Points: 30, Level: 1 Points: 30, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2013
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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 11:01 AM.
Reply With Quote
  #6 (permalink)  
Old September 25th, 2013, 11:03 AM
Wrox Author
Points: 93, Level: 1
Points: 93, Level: 1 Points: 93, Level: 1 Points: 93, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2012
Posts: 19
Thanks: 0
Thanked 3 Times in 3 Posts
Default

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?
Reply With Quote
  #7 (permalink)  
Old September 25th, 2013, 11:12 AM
Registered User
Points: 30, Level: 1
Points: 30, Level: 1 Points: 30, Level: 1 Points: 30, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2013
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I'm using Chrome.
Reply With Quote
  #8 (permalink)  
Old September 25th, 2013, 11:21 AM
Wrox Author
Points: 93, Level: 1
Points: 93, Level: 1 Points: 93, Level: 1 Points: 93, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2012
Posts: 19
Thanks: 0
Thanked 3 Times in 3 Posts
Default

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.
Reply With Quote
  #9 (permalink)  
Old September 25th, 2013, 06:08 PM
Registered User
Points: 30, Level: 1
Points: 30, Level: 1 Points: 30, Level: 1 Points: 30, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2013
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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 View Post
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.
Reply With Quote
  #10 (permalink)  
Old September 25th, 2013, 09:35 PM
Wrox Author
Points: 93, Level: 1
Points: 93, Level: 1 Points: 93, Level: 1 Points: 93, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2012
Posts: 19
Thanks: 0
Thanked 3 Times in 3 Posts
Default

What does the rest of your HTML file look like?
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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 02: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 03:41 PM
PHP Styling adaniels11 PHP How-To 1 April 10th, 2007 06:10 AM
XSLT and styling jacob XSLT 4 October 13th, 2005 03:50 AM



All times are GMT -4. The time now is 03:14 AM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.