PDA

View Full Version : importing css



jigger
Jul 15th, 2002, 02:41 PM
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.

SYP}{ER
Jul 15th, 2002, 03:23 PM
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 :eek:

Well, let us know if that helps or if it doesn't :)

jigger
Jul 15th, 2002, 03:52 PM
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

SYP}{ER
Jul 15th, 2002, 04:17 PM
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 :confused: