By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,935 Members | 1,559 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,935 IT Pros & Developers. It's quick & easy.

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

P: n/a
jon
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_files/p7tp_01t.css");
-->
<link href="index_files/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

Jun 27 '08 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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_files/p7tp_01t.css");
-->
...and remove the closing comment mark.
You forgot the closing: </style tag.
<link href="index_files/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_files" 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:
http://www.en.wampserver.com/

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

--
-bts
-Friends don't let friends drive Vista
Jun 27 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.