Jump to content

CSS and Index.php! Background image of the element!?

- - - - -

  • Please log in to reply
3 replies to this topic

#1
Stasonix

Stasonix

    Learning Programmer

  • Members
  • PipPipPip
  • 82 posts
  • Programming Language:C++, PHP, JavaScript, Delphi/Object Pascal, Pascal
  • Learning:C++, PHP, JavaScript, Delphi/Object Pascal
How in CSS style file set background path to image?

I made this:

.elem {

position: absolute;

cursor: pointer;

overflow: hidden;

background:url(images/drag.gif) no-repeat left top;

height:42px

}

and it's works, but only in case if my main file is index.html, but if I change it to index.php all will lost?

#2
Revolt

Revolt

    Programmer

  • Members
  • PipPipPip
  • 99 posts
What do you mean change it to index.php? I assume you aren't just changing the extension right?

As long as the html generated by the index.php has an element with class 'elem' (and uses that CSS code you have shown), the background image will appear.

You probably forgot to set the class of the element when generating the html in the php file.

#3
Xdawn90

Xdawn90

    Learning Programmer

  • Members
  • PipPipPip
  • 55 posts
If you are using an external CSS file, don't forget to link it.

#4
Stasonix

Stasonix

    Learning Programmer

  • Members
  • PipPipPip
  • 82 posts
  • Programming Language:C++, PHP, JavaScript, Delphi/Object Pascal, Pascal
  • Learning:C++, PHP, JavaScript, Delphi/Object Pascal

Xdawn90 said:

If you are using an external CSS file, don't forget to link it to your index.php.

I found solution, it was need only clean my cash.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users