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 5 of 5
  1. #1
    Regular Coder
    Join Date
    Nov 2005
    Posts
    750
    Thanks
    138
    Thanked 1 Time in 1 Post

    HTML page ignores CSS properties

    Hello

    I hope someone can help me with this frustrating problem.

    I have a page here: http://www.proofreading4students.com/Css_creator.asp

    The CSS (style1.css) belonging to this page has this:

    Code:
    body {
    
      background-color: #000000;
      color: #FFF;
      font: 100%/1.5 News Cycle;
      text-shadow: 1px 1px #000;
      background: transparent url(../images/background.jpg) repeat;}
    
    p.show_date { 
        font-size: 1em;  
    text-align: right; 
    margin-right:5px;
    
    }
    p.show_date sup {
        font-size: 1em;
    margin-right:5px;
    }
    but the Web page ignores the CSS. The font style 'News Cycle' is ignored; the date alignment is ignored, and the background colour is ignored. Why would that be?

    Ideally, the Web page should look similar to this with its black background, correct font, and right-aligned date:

    http://www.proofreading4students.com/projects_test.asp

    This page, projects_test.asp has exactly the same font, background, and date CSS properties (in style.css) as above as the Css_creator.asp page that I am having problems with.

    What might be the problem, please?

    Thank you.

  • #2
    Senior Coder
    Join Date
    Aug 2006
    Posts
    1,143
    Thanks
    7
    Thanked 257 Times in 256 Posts
    You're missing a closing brace in here:
    Code:
    @font-face { 
      font-family: News Cycle; 
        src: url('../fonts/NewsCycle-Regular.eot'); 
        src: local("News Cycle"), url('../fonts/NewsCycle-Regular.ttf'); 
    
    ** missing brace **
    
    html
    { height: 100%;}
    Dave

  • Users who have thanked tracknut for this post:

    SteveH (05-01-2013)

  • #3
    Regular Coder
    Join Date
    Nov 2005
    Posts
    750
    Thanks
    138
    Thanked 1 Time in 1 Post
    WOW! The hours I have spent trying to resolve this problem!

    Many thanks for that, hawk's eye Dave!

    I owe you a beer.

    Cheers

    Steve

  • #4
    Senior Coder jerry62704's Avatar
    Join Date
    Oct 2007
    Location
    Springfield, IL
    Posts
    1,100
    Thanks
    13
    Thanked 87 Times in 87 Posts
    Steve, you may have a mistake in the css or it could be a typo here.

    You have:
    font: 100%/1.5 News Cycle;
    but it should be:
    font: 100%/1.5 'News Cycle';

    Assuming it is one font of course.
    .
    .
    ...and gladly would he learn and gladly teach

    Visit www.LiberalsWin.com for humor and the unique Bush/Obama Approval Polls

  • Users who have thanked jerry62704 for this post:

    SteveH (05-02-2013)

  • #5
    Regular Coder
    Join Date
    Nov 2005
    Posts
    750
    Thanks
    138
    Thanked 1 Time in 1 Post
    Hello Jerry

    Just inserted the inverted commas around 'News Cycle', uploaded the style sheet, and it all looks just fine now - THANK YOU!

    Steve


  •  

    Posting Permissions

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