• I really just need to put the header file info into the sytle.css file.

    I tried taking the #header & #headerimage code out of the header file and putting it into the css file. But Im not sure where exactly to put it and what code to take out of the header file and put in to the css file.

Viewing 5 replies - 1 through 5 (of 5 total)
  • You simply can’t put the header code into the css-file. The header is php-code, and is actually a small program, while the css is just css and will never get executed.

    The problem is that in your css you need the complete url of the image, wordpress directory and probably hostname too. The code in the header.php does this for you.

    If you want to do a css-only image, that is ok as long as you put the complete path (including the path to the theme directory) in your css. This makes it impossible to package your theme as a bundle and put it on another site, which is the reason it was not put in the css.

    Thread Starter Rob Poitras

    (@bob46802)

    that makes sense. reason I ask, im trying to have a header image based upon what category is being displayed.
    Changing the css files seemed easier than switching header files.

    What would happen if you made sure the image was in your theme directory. Or you just used a relative path ?

    Thread Starter Rob Poitras

    (@bob46802)

    it should be fine. i know people that use css to point their sidebar image backgrounds.
    like the background for pages, categories, meta, etc…

    I have never understood why that code is in the index.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘put kubrick image info into css file’ is closed to new replies.