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 4 of 4

Thread: importing css

  1. #1
    New to the CF scene
    Join Date
    Jul 2002
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy importing css

    I have set up an css in dreamweaver everything works fine in IE5.5. When I view a page that is within a folder one directory "away" from my style sheet and background image wont appear, but it views fine when the page is in the same directory as the style sheet. Also how do I keep the font in arial in netscape it always changes apart from the links. Please can someone help me.

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Location
    Ontario, Canada
    Posts
    183
    Thanks
    0
    Thanked 0 Times in 0 Posts
    For your stylesheet, don't use relative referencing. I mean, try this instead:

    <link rel="stylesheet" type="text/css" href="http://yoursite.com/folder/name_of_css_fille.css" />

    Then it will work no matter where the page is

    About the font in NS, you can try this if you haven't already:

    body,table,td { font-family Arial; }

    You need to make sure you're styling tables and the body itself because NS doesn't consider them the same, content wise (IE does.)

    Also, make sure you aren't declaring a different font for the a tag, like DW may have gone and put a { font-family: "Times New Roman"; } somewhere

    Well, let us know if that helps or if it doesn't
    Offtone.com - In the works...

  • #3
    New to the CF scene
    Join Date
    Jul 2002
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    It didnt work, what can now?

    Thanks for your suggestion, Im afriad that didnt work in netscape either. It worked in IE though.
    I have included a link to my test page below in case everyone can spare a minute to have a look, also someone said my home page appears on a iMac but none of the other pages, I'm putting this all down to my style sheet being within another directory. Please can you suggest something. I must be doing something wrong, it's driving me mad.


    http://www.teignbridge.gov.uk/About%20TDC/testCSS.htm

  • #4
    Regular Coder
    Join Date
    Jun 2002
    Location
    Ontario, Canada
    Posts
    183
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Why do you declare a:link 4 times in your stylesheet?

    And 3 of them are empty!

    a:link { }

    Try this:

    body,table,td { font-family: Arial, Helvetica, sans-serif; font-size: small; background-image: url(buttons/bluebg.gif); background-color: #FFFFFF; background-repeat: repeat-y }
    a:link { font-family: Arial, Helvetica, sans-serif; font-size: small; color: #0033CC; text-decoration: underline }
    a:hover { font-family: Arial, Helvetica, sans-serif; font-size: small; color: #FF6600; text-decoration: underline }
    .boldtext { font-family: Arial, Helvetica, sans-serif; font-size: small; font-weight: bold; color: #000000 }
    .table1 { font-family: Arial, Helvetica, sans-serif; font-size: small; margin-top: 0px; margin-left: 0px; height: 600px; width: 800px; left: 0px; top: 0px; clip: rect( ); float: left; padding-top: 0px; padding-left: 0px }
    .td1 { font-family: Arial, Helvetica, sans-serif; font-size: small; text-decoration: none }
    .H1 { font-family: Arial, Helvetica, sans-serif; font-size: medium; font-weight: bold; color: #0033CC }
    .table2 { font-family: Arial, Helvetica, sans-serif; font-size: small }
    .body1 { background-color: #FFFFFF; background-image: url(buttons/bluebg.gif); background-repeat: repeat-y }

    If that doesn't work, run it through the validator at:

    http://jigsaw.w3.org/css-validator/

    PS: Your current .css file isn't being accepted by the validator. Try copying that CSS I gave you above, pasting it into Notepad, and saving as *.css. I think your current file is corrupted or something
    Offtone.com - In the works...


  •  

    Posting Permissions

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