[wp-hackers] Share CSS with parent site

Dan Gayle dangayle at gmail.com
Fri Nov 21 17:31:18 GMT 2008


So would I @import like this?

  @import url("/styles/style.css");

Now, if I wanted to call an absolute path from the html itself, how  
would I do it? I assume it would be similar to this, but with a  
different variable that indicates the root directory:
<link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/ 
ie55.css" />

Or would it be more like this, but with a different constant (And a  
different function, since this would just put the code into the html  
rather than reference the external style):

<?php include (TEMPLATEPATH . '/style.css'); ?>


On Nov 21, 2008, at 8:48 AM, Glenn Ansley wrote:

> There are a couple of ways to do this. The easiest would probably be  
> to just
> delete all the style information in your styles.css (leave the theme  
> info in
> the comments) and then use the @import method to bring in your  
> style.css
> file.
>
> On Fri, Nov 21, 2008 at 11:36 AM, Dan Gayle <dangayle at gmail.com>  
> wrote:
>
>> I'm running an installation where the blog is integrated into an  
>> existing
>> website. The blog sits outside the root directory in /blog/
>>
>> We matched the styles of the parent site with the styles in our  
>> theme, but
>> we would like to take it a step further. It sucks having to  
>> maintain two
>> identical sets of stylesheets.
>>
>> How is it possible to share one single css file between both the  
>> parent
>> site and the wordpress install?
>> _______________________________________________
>> wp-hackers mailing list
>> wp-hackers at lists.automattic.com
>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers



More information about the wp-hackers mailing list