Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New Coder
    Join Date
    May 2007
    Location
    MI USA
    Posts
    54
    Thanks
    18
    Thanked 1 Time in 1 Post

    css tags not working on internet

    Style sheet is working.


    several tags on style sheet like this are not.

    .footer
    {
    text-align:center;
    font-size: 10px;
    }



    <body>

    <div class="footer"> Be sure to use a descriptive title </div>

    Just learned code works in <head> I want it on the stylesheet.

    Any ideas why it dosen't work from stylesheet????
    Last edited by rob86; 03-31-2012 at 08:44 PM.

  • #2
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Hello rob86,
    It could be any number of reasons. The only way for anyone to tell is to see the testsite. Give us a link.
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • Users who have thanked Excavator for this post:

    rob86 (03-31-2012)

  • #3
    New Coder
    Join Date
    May 2007
    Location
    MI USA
    Posts
    54
    Thanks
    18
    Thanked 1 Time in 1 Post
    Quote Originally Posted by Excavator View Post
    Hello rob86,
    It could be any number of reasons. The only way for anyone to tell is to see the testsite. Give us a link.
    http://melendy-mi.us/gen/help.html

    http://melendy-mi.us/gen/templates/t.../css/nancy.css

    It would be easier if you use something that uses line numbers.

    Line 137 is marked as "problem area" area.

    The exact same code is in the document <head> remmed out. It works!!!

  • #4
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    In your linked .css file, this is invalid
    Code:
    p.firstPage {
    	font-family:Comic Sans MS;font-size:20px;line-height:20px;    ;"
    It's missing the closing } and the " is not needed, which is making everything below that line not work.

    Check out the links about validation in my signature line. They can really help you. There is also a link about tables there that you should have a look at.
    Last edited by Excavator; 04-01-2012 at 01:04 AM.
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #5
    New Coder
    Join Date
    May 2007
    Location
    MI USA
    Posts
    54
    Thanks
    18
    Thanked 1 Time in 1 Post
    Thanks a bunch
    I don't know how that happened but it's working now.

    Now I have a new problem.

    p.firstPage {
    font-family:Comic Sans MS;font-size:20px;line-height:20px;
    }

    This code is used on a different page. It is now effecting the help page. I have researched this and found nothing.

    Is there a way to stop this code from effecting the help page?

  • #6
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Quote Originally Posted by rob86 View Post
    Thanks a bunch
    I don't know how that happened but it's working now.

    Now I have a new problem.

    p.firstPage {
    font-family:Comic Sans MS;font-size:20px;line-height:20px;
    }

    This code is used on a different page. It is now effecting the help page. I have researched this and found nothing.

    Is there a way to stop this code from effecting the help page?
    Haven't you linked us to the help page? I don't see it affecting any paragraph text here.

    Specificity is the answer though. If your styling is more a blanket style than pinpointed, you are not specific enough. See specificity here.
    I disagree with some of what that page says, floats and specificity are pretty simple concepts for new coders to grasp. I think the box model and clearing floats give them more trouble.
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad


  •  

    Posting Permissions

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