0

When I am finished with the page. When its done. I want somehow to lock the images (for ex. header logo layer - try it out: http://www.lipanska.cz/ move with the header text EWITA). On the other side at https://www.google.com the logo is locked and I cant move with it.

How could i lock them? Thank you very much for your time!

Vova
  • 37
  • 1
  • 5

2 Answers2

0

It's because Google uses a div with a background-image and the other page is using an img tag. The latter makes it dragable with the mouse cursor. You can also prevent dragging with any tag as discussed here: Disable dragging an image from an HTML page

Community
  • 1
  • 1
vanthome
  • 4,816
  • 37
  • 44
0

Use Background Images.

demo:

div{
    background:url(http://lorempixel.com/100/100);
    height:100px;
    width:100px;
}
<div></div>
<img src="http://lorempixel.com/100/100"></img>

You cannot move first image, however you can move the second one.

Prakhar Thakur
  • 1,209
  • 3
  • 13
  • 38