WordPress.org

Ready to get started?Download WordPress

Forums

what image location for root directory ? (5 posts)

  1. Sr-ultimate
    Member
    Posted 8 years ago #

    Im trying to customize a theme , now I have a prob . In CSS i need to get image from a current theme location in the theme directoy. prob is, what should I give as the location ? I want to give this theme out so i cant give the URL of my site. then ?

    (../images/image.gif) ??

  2. moshu
    Member
    Posted 8 years ago #

    The best way to go: the theme directory should have its own images subdirectory.
    E.g. if you distribute a theme called "ultimate" :) - you should have a directory ultimate containing all the necessary files [index, archives, header etc.] AND a subdirectory "images" with all the images used in the theme. And you'll have to include the images, too, in the distro zip.

  3. Sr-ultimate
    Member
    Posted 8 years ago #

    I think you didnt get it .
    Yes i
    m asking that only .i have a image folder under the directory. but I need to know how to call it in CSS. say an image my-theme/images/myimage.jpg

    now what should I give in "my-theme/css.css" so that it`ll call "my-theme/images/myimage.jpg" .

  4. Sr-ultimate
    Member
    Posted 8 years ago #

    I think you didnt get it .
    Yes im asking that only .i have a image folder under the directory. but I need to know how to call it in CSS. say an image my-theme/images/myimage.jpg

    now what should I give in "my-theme/css.css" so that it`ll call "my-theme/images/myimage.jpg" .

  5. Beel
    Member
    Posted 8 years ago #

    The css pulls images relative to where style.css is so you would use just url(images/myimage.jpg); if the images directory is a subdirectory of where your style.css is (a pete and repeat sentence to match your double post :-).

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags