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 7 of 7
  1. #1
    New Coder
    Join Date
    Aug 2008
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Can't seem to change font when using content viewer

    I'm trying to use the following fade in content viewer:

    http://www.javascriptkit.com/script/...ntviewer.shtml

    Everything works great except that I can't seem to change the font of the content divs no matter what I do. I can change the color of the font but it seems the css "font" tag itself doesn't work anymore.

    I can change the font of the pagination links just fine.

    Is there something in that code I'm missing that's preventing me from changing the font?

  • #2
    Regular Coder ninnypants's Avatar
    Join Date
    Apr 2008
    Location
    Utah
    Posts
    504
    Thanks
    10
    Thanked 47 Times in 47 Posts
    Try being more specific and use 'font-family' because I don't see any code that declares what the font should be

  • #3
    New Coder
    Join Date
    Aug 2008
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I don't see anything that would affect the font either, but for some reason it's still not working.

    I'm using the exact code from the tutorial page. I want to change the font of all the content divs to 10pt Verdana to match the rest of the website.

    The CSS I have now is (this is added to the default CSS from the exemple)

    .fadecontent {
    font: 10pt Verdana, sans-serif;
    color: green;
    }

    This makes the text green but the font doesn't change to 10pt verdana. It's the css code I use for the rest of the site and it works as it's supposd to in any other divs but the ones that load with the fade in viewer thing.

    Any ideas?

  • #4
    Regular Coder ninnypants's Avatar
    Join Date
    Apr 2008
    Location
    Utah
    Posts
    504
    Thanks
    10
    Thanked 47 Times in 47 Posts
    Try changing it to
    Code:
    .fadecontent {
    font-family:Verdana, sans-serif;
    font-size:10px;
    color: green;
    }

  • #5
    New Coder
    Join Date
    Aug 2008
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thank you for your help, unfortunately it still won't change from the default font you can see on the exemple.

    It's like it ignores any kind of font related CSS command. The weirdest part is that it works fine for the navigation. I changed each "page" link with no issues at all. Only the content seems stuck in that courrier looking font at whatever size that is!

  • #6
    Senior Coder rangana's Avatar
    Join Date
    Feb 2008
    Location
    Cebu City, Philippines
    Posts
    1,752
    Thanks
    65
    Thanked 372 Times in 365 Posts
    Could you please provide a link to the page in question.
    Learn how to javascript at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph

  • #7
    New Coder
    Join Date
    Aug 2008
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Well, I figured it out... I was using a <center> code in the html to center the title of each section and apparently that was causing the problem...

    I really dont get why but it was..
    Last edited by enkay; 08-06-2008 at 06:48 AM.


  •  

    Posting Permissions

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