HighDots Forums  

@import tag

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss @import tag in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
lvthunder
 
Posts: n/a

Default @import tag - 08-01-2004 , 07:40 PM






I'm trying to use the following code to import my CSS style sheet but
Dreamweaver MX 2004 isn't reconiging my style sheet

I Would like to do it this way so I can define another stylesheet when
printing.

Thanks,

<style type="text/css" media="all">@import
url(http://www.lvthunder.com/layout.css);</style>


Reply With Quote
  #2  
Old   
Misha
 
Posts: n/a

Default Re: @import tag - 08-02-2004 , 02:07 AM






try calling the stylesheet normally:

<link href="file.css" rel="stylesheet" type="text/css" />

or using import; then have the stylesheet call the other stylesheet.


In other words have the stylesheet contain "@import
url(http://www.lvthunder.com/layout.css)".


lvthunder wrote:

Quote:
I'm trying to use the following code to import my CSS style sheet but
Dreamweaver MX 2004 isn't reconiging my style sheet

I Would like to do it this way so I can define another stylesheet when
printing.

Thanks,

style type="text/css" media="all">@import
url(http://www.lvthunder.com/layout.css);</style


Reply With Quote
  #3  
Old   
Misha
 
Posts: n/a

Default Re: @import tag - 08-02-2004 , 02:13 AM



I don't think you can import a stylesheet in a <style> tag.

Reply With Quote
  #4  
Old   
Randy Edmunds
 
Posts: n/a

Default Re: @import tag - 08-02-2004 , 12:27 PM



DW doesn't recognize absolute urls (e.g.
http://www.lvthunder.com/layout.css), so you need to copy the .css file
to your site and use a page or site-root relative path.

For example, if you copy layout.css file to the same folder as your
page, then the markup would be:

<style type="text/css" media="all">
@import url(layout.css);
</style>

HTH,
Randy


Quote:
I'm trying to use the following code to import my CSS style sheet but
Dreamweaver MX 2004 isn't reconiging my style sheet


Reply With Quote
  #5  
Old   
mzanime.com
 
Posts: n/a

Default Re: @import tag - 08-02-2004 , 12:41 PM



But its more useful to link to it as a short-absolute path. This way DMX
doesn't change its path, and also it can be found from any file on the site.

And... there are two ways to link to a style sheet using the @import rule.

(1.) <style type="text/css"> @import: url(/css/index.css) </style>

(2.) <style type="text/css"> @import "/css/index.css" </style>


Reply With Quote
  #6  
Old   
Misha
 
Posts: n/a

Default Re: @import tag - 08-02-2004 , 02:40 PM



I suppose I'm wrong given the replies.

Misha wrote:

Quote:
I don't think you can import a stylesheet in a <style> tag.

Reply With Quote
  #7  
Old   
Misha
 
Posts: n/a

Default Re: @import tag - 08-02-2004 , 02:46 PM



Also, it will work on your www site as absolute (if you can use import
in the <style>).

mzanime.com wrote:

Quote:
But its more useful to link to it as a short-absolute path. This way DMX
doesn't change its path, and also it can be found from any file on the site.

And... there are two ways to link to a style sheet using the @import rule.

(1.) <style type="text/css"> @import: url(/css/index.css) </style

(2.) <style type="text/css"> @import "/css/index.css" </style


Reply With Quote
  #8  
Old   
lvthunder
 
Posts: n/a

Default Re: @import tag - 08-03-2004 , 12:08 AM



Thanks everyone for the help. I took out the direct link and replaced it with a relative link and it works now.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.