SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Enthusiast
    Join Date
    Sep 2009
    Posts
    51
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Specificity Issue?

    I am using Build Your Website the Right Way and have made it to Chapter 4! At this point I have 3 very simple pages, all of which have the same navigation markup on them - exactly the same.

    The navigation in each of the three pages work just fine.

    The next thing I am to do is to put a border around them and change the background color - thru setting up a "#" element in the style sheet for the div of the navigation - 2 of the 3 pages show the changes that #navigation calls for, but the index page shows no change at all. If it means anything, I am working on page 138.

    The markup for each of the three pages all looked the same to me in this area, but I took the old markup for the navigation div out of the page that doesn't work, and copied and pasted from one of the pages that does work. That didn't change anything.

    The #navigation commands are the last on the style sheet, and I don't see anything that would interfere. This is the first time I have done anything to style this div as a whole and the markup is <div id="navigation"> and </div>.

    Does anyone have any idea what might interfere with this #navigation that puts a border around the navigation section and changes the background color inside the box?

    Thanks,
    Jeannie

  2. #2
    SitePoint Guru kish's Avatar
    Join Date
    Jun 2003
    Location
    UK
    Posts
    923
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Jeannie

    You should really post the full code up here so we can have a look. Or better yet, link to it live on the web.

    Cheers
    Fast Fwd Multimedia
    Web, IT & Cloud Computing Consultancy
    Currently looking for web freelancers. Get in touch!

  3. #3
    SitePoint Enthusiast
    Join Date
    Sep 2009
    Posts
    51
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Kish,

    Thank you for your reply, but I really didn't think it was appropriate to put 3 or 4 pages of code in one of these messages. I knew it was a long shot that someone would have some suggestions for me based on what I had to give as a problem.

    The good news is that I found the solution, and now I have a new debugging skill. The problem was not with the navigation code, nor with the code in the style sheet. The problem was that I was missing a closing quotation mark in the division id that was above the navigation code that wasn't accepting the border or the background change. It read <div id="tagline>, rather than <div id="tagline">. I was totally astonished that the navigation worked at all, and I hadn't realized there was any problem with the tagline - it wasn't showing up on the page that was having the border problem, and I hadn't noticed. I must have erased the tagline quotation mark when I corrected another typo in that same bracket. I had called it tag line on the web pages and tagline in the style sheet, and when I corrected that I must have erased the closing quote. Onward...

    Jeannie

  4. #4
    SitePoint Enthusiast
    Join Date
    Jun 2009
    Posts
    64
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    One thing to look for, if you are using a design tool rather than a straight text editor, is error highlights. That should have been highlighted on your design tool as an error. The other thing you could use which will hopefully show up errors like this (or at least that there is an error there) is to validate your html using something like
    http://validator.w3.org/#validate_by_input

  5. #5
    SitePoint Enthusiast
    Join Date
    Sep 2009
    Posts
    51
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Mad-Halfling,

    I see I should have been more imaginitive in picking a user name, definitely.....

    Thank you so much for your suggestion about the validator site, I think I could surely use it. The book has us using notepad, and I am finding learning CSS a great deal of fun...when the markup works! But it isn't all that much fun when I screw it up and can't figure out what I did wrong.

    I went out and took a look at the site and I think I will get a lot of use out of it.

    Thank you so much

    Jeannie


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •