Q: Correct path for the @import rule and a url

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • jon

    Q: Correct path for the @import rule and a url

    Hello,
    I currently have a html and a css file with a @import rule and a url (see
    example below)
    test.html
    <style type="text/css" media="screen">
    <!--
    @import url("index_file s/p7tp_01t.css");
    -->
    <link href="index_fil es/demo.css" rel="stylesheet " type="text/css">
    In my css file I have this:
    ..cinema {
    background-image: url(pictures/movieicon.gif);

    I know this works if I place the gif and css on the server but how can I do
    this if I want to check this out on my pc hard drive. I tried using the path
    @import("D:/index_files/p7tp_01t.css and background-image: url(D:/pictures/
    movieicon.gif) but no luck.
    Any help would be appreciated



  • Beauregard T. Shagnasty

    #2
    Re: Q: Correct path for the @import rule and a url

    jon wrote:
    I currently have a html and a css file with a @import rule and a url
    (see example below)
    I don't see a URL to your site...
    test.html
    <style type="text/css" media="screen">
    <!--
    Remove those HTML comment marks. Not necessary since about a hundred
    years ago.
    @import url("index_file s/p7tp_01t.css");
    -->
    ...and remove the closing comment mark.
    You forgot the closing: </style tag.
    <link href="index_fil es/demo.css" rel="stylesheet " type="text/css">
    In my css file I have this:
    .cinema {
    background-image: url(pictures/movieicon.gif);
    >
    I know this works if I place the gif and css on the server but how can
    I do this if I want to check this out on my pc hard drive. I tried
    using the path @import("D:/index_files/p7tp_01t.css and
    background-image: url(D:/pictures/ movieicon.gif) but no luck.
    To do what you want, I think, would require you to be running a web
    server on your PC. Or .. it may work if you use the exact same structure
    on your local drive as you have on the web host's server.

    "index_file s" tells me you are using some sort of Microsloth tool for
    generating these pages. Whoops.

    If you want to install a server, and you're using Windows, try this:


    Post a URL to your site so we don't have to guess.

    --
    -bts
    -Friends don't let friends drive Vista

    Comment

    Working...