Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

natatos

macrumors regular
Original poster
Dec 23, 2008
137
0
Iowa
like on smosh.com they have the cardboard and the paint on it how is that not dragable if its a background how does it not repeat kind of thing
 

Shadow

macrumors 68000
Feb 17, 2006
1,577
1
You need to set it as a background. For example:

Code:
CSS:
.box {
   background-image: url(relative/path/to/image.jpg);
   height: 100px;
   width: 100px;
}

HTML:
<div class="box"></div>

However, this isn't a particularly "good" thing to do on the 'net, and even so if people *really* want the image they can hunt through your CSS and get it. Why do you want to do this anyway?
 

Dimwhit

macrumors 68020
Apr 10, 2007
2,069
299
Don't forget, unless you can disable the ability to take a screenshot, there's no way to protect your images. Watermarks are the best if you're really concerned about it.
 

natatos

macrumors regular
Original poster
Dec 23, 2008
137
0
Iowa
well its not really that I dont want people to take the pictures or anything but I want stuff like borders and other decretive stuff that are images that would be better if they weren't savable also I forgot to add I use dreamweaver CS4
 

Tomorrow

macrumors 604
Mar 2, 2008
7,160
1,365
Always a day away
well its not really that I dont want people to take the pictures or anything but I want stuff like borders and other decretive stuff that are images that would be better if they weren't savable also I forgot to add I use dreamweaver CS4

This would be cumbersome, but you could make your site entirely Flash-based. Much harder to grab an image from a Flash movie than a CSS or HTML site.
 

Shadow

macrumors 68000
Feb 17, 2006
1,577
1
This would be cumbersome, but you could make your site entirely Flash-based. Much harder to grab an image from a Flash movie than a CSS or HTML site.

Please, don't. Flash is terrible, and if people *really* want the image, they'll just use a SWF decompiler and get it. A good rule of thumb for anything to do with DRM is that if you can 'consume' it (like viewing an image, hearing some music, watching a video), it can be cracked.

well its not really that I dont want people to take the pictures or anything but I want stuff like borders and other decretive stuff that are images that would be better if they weren't savable also I forgot to add I use dreamweaver CS4

If you want to add borders and things like that, an inline image is probably your best bet. It would also make floats easier, like so:

Code:
HTML:
<img src="relative/path/to/image.jpg" alt="Demo image" class="image" />

CSS:
div.image {
    float: left;
    border: 1px solid silver;
}
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.