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 10 of 10
  1. #1
    New Coder
    Join Date
    Nov 2002
    Posts
    45
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Angry NN4 problems - font and background

    I have a couple of problems with my style sheet in NN4 (works fine in IE and NN6) on a PC. The first is regarding font family. Here is the relevant declarations in my style sheet.

    body { font-family: Verdana, Arial, Helvetica, sans-serif; color: #000000; background-image: url(../../images/ode_bg1.gif); margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; background-repeat: repeat-y; font-size: 80%;}
    td { font-size: 80% }

    I have redefined the size in the td declarations because td's ignore size - as far as I am aware the family should cascade through. The problem is that whilst it is cascading through, in NN4 it only does it for part of the page. The main body of the page is all within a <td> tag so my logical thinking is that it should work. However, it is only working if the text is inside a nested table. Here is a link to a sample page.

    http://iet.open.ac.uk/coursesonline/...cfm?course=ode

    The second issue is regarding the background-url declaration, which again is not working in NN4 but is in everything else. The portion of my style sheet above shows the declaration and the link above shows it not working.

    If anyone can help I'd be very grateful.

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    The Netherlands, Baarn, Ut.
    Posts
    4,252
    Thanks
    0
    Thanked 0 Times in 0 Posts

    font-size option; url no idea

    Willowfae,

    i experienced the exact same problems you did; an option for solving the font size issue inside td's is using an extra container (like a div) to envelop the text and assigning the desired styles to that; the url issue i encountered not only with NN4, but with Win IE 5.0 as well. I haven't solved that in an other way then using the deprecated background attribute from the body element (Eeww... i know )

    Anyone any better suggestions?
    Regards,
    Ronald.
    ronaldvanderwijden.com

  • #3
    New Coder
    Join Date
    Nov 2002
    Posts
    45
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Is that also the only way to fix the font family issue? The size is not the problem as that has been redefined in the td declaration and works fine. I just didn't want to have to go through and edit every page on the site to get the family to work

  • #4
    Regular Coder
    Join Date
    Jun 2002
    Location
    NL
    Posts
    421
    Thanks
    0
    Thanked 0 Times in 0 Posts
    If I remember well, some browsers, including NN4 are looking for the background image relative to where your .css is. Other browsers see the URL from where your page is. So it's best to use a URL like this {from the root of your domain}:

    background-image: url(/images/ode_bg1.gif); or use the full http://..etc..



    And as for the fonts; if your text is in a paragraph -and it is- then put the P in the rule. This always worked for me:

    body, td, p {font-family:Verdana,Arial,Helvetica,sans-serif;font-size:80%;}

  • #5
    Senior Coder
    Join Date
    Jun 2002
    Location
    The Netherlands, Baarn, Ut.
    Posts
    4,252
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Don't know...

    I'm sorry, i haven't got any alternatives for you; perhaps one of the other members has some ideas.
    On the background image bit, i was barking up the wrong tree; i tried a test page previously viewed in IE in NN4.6 for a change, and although the layout was totally messed up i did manage to set a background image for a div using an internal style sheet.
    In a totally different situation i haven't managed to do the same for the body using an external style sheet; lo and behold, an internal style was the solution here as well!
    Don't quote me on this one, though, since there were other issues that might've interfered here.
    Just for the fun of it, you could try adding an internal style sheet with just the background-image declaration after your external style sheet link and see if that helps.

    Oh, after a quick browse over your code, i would recommend trying to replace those nested tables by container elements like div's anyway; you can use CSS to set the desired borders, and if you go about it carefully this should work in NN as well.
    I don't know if this is familiar to you, but i often use the CSS Tutorial from W3Schools, as it adresses browser compatibility issues as well.
    Regards,
    Ronald.
    ronaldvanderwijden.com

  • #6
    New Coder
    Join Date
    Nov 2002
    Posts
    45
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Originally posted by MCookie
    And as for the fonts; if your text is in a paragraph -and it is- then put the P in the rule. This always worked for me:
    I tried that - defining the p - and it worked fine until I got to a <ul>. So I surrounded the <ul> in a <p> thinking that it would carry through but it didn't. It looks as if I will have to define EVERYTHING but I was kind of trying to avoid that

  • #7
    New Coder
    Join Date
    Nov 2002
    Posts
    45
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Don't know...

    Originally posted by ronaldb66

    I don't know if this is familiar to you, but i often use the CSS Tutorial from W3Schools, as it adresses browser compatibility issues as well.
    Yes, that was the first place I went too. All it said there is that the background-url should work in NN4.

    Thanks for your comments

  • #8
    Senior Coder
    Join Date
    Jun 2002
    Location
    The Netherlands, Baarn, Ut.
    Posts
    4,252
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Closing tags!

    One more: always use closing tags at the appropriate locations! Don't leave it to the browser to figure out where to end one element and where to start another; NN is known to be much pickier then i.e. IE (no pun), so if your paragraph ends before you start a list, use an end tag.
    The latest versions of HTML, noticably XHTML, require properly closed elements anyway, so it's a good habit to make your own.
    Regards,
    Ronald.
    ronaldvanderwijden.com

  • #9
    Regular Coder
    Join Date
    Jun 2002
    Location
    NL
    Posts
    421
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Another one. I didn't explain very well about the background image.

    Lets say your page is at the root of your domain: index.html
    And your external stylesheet is here: style/site/global.css
    And your background-image is also at the root: circles.gif

    When NN4 loads the index.html it reads the global.css and that says:
    background-image url(circles.gif)

    NN4 starts looking for the image from where the global.css is. So NN4 looks for the image here: style/site/circles.gif
    But it's not there..

    So, for NN4 and some other browsers you should use:

    background-image url(/circles.gif) /* note the slash in front of the image */

    or:

    background-image url(http//www.domain.com/circles.gif)

  • #10
    Senior Coder
    Join Date
    Jun 2002
    Location
    The Netherlands, Baarn, Ut.
    Posts
    4,252
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Just NN4?

    McCookie,

    very enlightening; could this be the case for other browsers beside NN4 as well? I had a serious fight setting the desired background-image; using an external style sheet just didn't work, but declaring a local inline style worked perfectly.
    This phenomenon occurred in a Lotus Domino based site, where the page itself resided as a document in one database, and the background image and style sheet both resided in another. The browser used was IE 5.5 on Win NT, but is suspect Lotus Domino from interfering...
    Regards,
    Ronald.
    ronaldvanderwijden.com


  •  

    Posting Permissions

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