• I have made a custom theme and am hosting it on wordpress locally. I have tried this code inside my header.php file to link to my stylesheet but it wont work.

    <link rel="<?php bloginfo( 'stylesheet_url' );?>http://localhost:8080/htdocs/wordpress/wp-content/themes/twentyelevenchild/CSS/motorresolve.css" type="text/css">

    Any idea why it wont work? or how i write it?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter marcweissdesign

    (@marcweissdesign)

    ive managed to link to my css files now…but for some reason the background image doesnt show?

    the url is correct far as i cant tell

    html, body {background:url (Images/headers/image.gif) repeat;}

    popper

    (@julialasarte)

    Keep in mind that paths are case sensitive, so Images is different than images. Other than that, if you have a css file inside a folder, say, css and the images folder is not inside that same folder, you need to go up one directory: url(../images/etc):

    Theme
    --images
    --css
    Thread Starter marcweissdesign

    (@marcweissdesign)

    I am hosting locally using xampp.

    this is my full directory:

    http://localhost:8080/wordpress/wp-content/themes/twentyelevenchild/Images/headers/image.gif

    This full link didnt work either.

    My css files are within a CSS folder which is within my Theme folder.

    Also within my theme folder i have an Images folder (capital I) within that i have a headers folder and within that is my image.

    Theme>

    CSS> style.css Images> headers> image.gif.

    So i have written this in my css file:

    html, body {background:url(../Images/headers/bground_grey.gif) repeat; margin:0; padding:0;}…… but its still not working. But if i change it to a solid colour it works. Any ideas? Thanks for replying

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Cannot link to my css file’ is closed to new replies.