473,320 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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

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
1 3197
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Matt Walker | last post by:
I'm running PHP 4.3 on a Windows 2000 server w/ IIS. I have php installed on C: under a folder called 'php'. My website resides on D:. I have a form on one of the pages in a subfolder in the...
3
by: Ben Allfree | last post by:
Written to normalize web server path names based on a virtual root. I propose that something equivalent to this be added to os.path ------------------------------------- import os.path import...
16
by: Manlio Perillo | last post by:
Hi. I'm a new user of Python but I have noted a little problem. Python is a very good language but it is evolving, in particular its library is evolving. This can be a problem when, ad example,...
5
by: Steve Holden | last post by:
This is even stranger: it makes it if I import the module a second time: import dbimp as dbimp import sys if __name__ == "__main__": dbimp.install() #k = sys.modules.keys() #k.sort() #for...
2
by: Dave Higgins | last post by:
When the @import rule is used in the html markup to hide advanced css from older browsers, is that css downloaded with every page from a site? (which would be redundant) Or is it different if...
3
by: Christoph Zwerschke | last post by:
Just hitting a strange problem with Python import behavior. It is the same on all Python 2.x versions and it is probably correct, but I currently don't understand why this happens. I have...
7
by: Ron Adam | last post by:
from __future__ import absolute_import Is there a way to check if this is working? I get the same results with or without it. Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) on win 32 ...
4
by: adamjblakey | last post by:
What would be the correct MOD Rewrite rule for this: http://www.website.co.uk/building-an...ices/cheshire/ I thought it would be: Code: RewriteRule ^building-and-construction/(+)/(+)/$...
0
by: mh | last post by:
mh@pixar.com wrote: ah, the magic of __init__.py. Thanks all! -- Mark Harrison Pixar Animation Studios
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.