Question:

Help with external stylesheets?

by  |  earlier

0 LIKES UnLike

i need to make a website for university and it must have a external style sheet. i must email the final site to the lecturer in a zip file but will the.css file still be linked to the webpage when he opens it or will it try to reference the location on my computer were i have the css file. e.g my documents?. any help or advice welcome. im using frontpage 03

 Tags:

   Report

3 ANSWERS


  1. Have a look at the path in your web pages; if it references a drive letter, then it might work if your lecturer has access to the folder the css file is in.

    The simplest way around this is to include all of the files (web pages, images, scripts and css) in appropriate folders in the zip file.

    So make an images folder, a scripts folder, and so on. Then make sure the link in your web pages links to the appropriate file in its corresponding folder.

    When the lecturer extracts the files and puts them on the test server, the links will al work.


  2. well here is this what you put inside the head tag

    <link rel="stylesheet" type="text/css" href="Location of the css file ">


  3. Use relative links.  Don't put a hard coded file name in there.

    What NOT to do:

    <style type='text/css'>

    @import("C:\www\test.com \css\layout.css");

    </style>

    -- NOTE: Space added so Yahoo Answers will show the full source.

    Do this instead:

    <style type='text/css'>

    @import("css/layout.css");

    </style>

    That will look for layout.css in the css directory and not worry about where it started from.

    Take care,

    Chad

Question Stats

Latest activity: earlier.
This question has 3 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.