It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming CSS Forum

Printing CSS "Cropped" Images

Printing CSS "Cropped" Images

Postby TheWebJunkie on Mon Oct 04, 2010 10:33 pm

I have "cropped" an image using the following CSS:

div.crop {
height: 200px;
width: 200px;
overflow: hidden}

div.crop img {
margin: -0px 00px -0px -50px}

(div class="crop")
(img height="200" src="photos/test.jpg" class="crop")
(/div)

For purposes of this post, I have replaced the carets with parentheses. Anyway, the script works -- on the screen, that is. My problem is, when the page is PRINTED the images appear in their original uncropped size. What script should I be using?

--TheWebJunkie
TheWebJunkie
 
Posts: 1
Joined: Mon Oct 04, 2010 10:18 pm

Re: Printing CSS "Cropped" Images

Postby EMaks on Wed Nov 24, 2010 7:08 pm

Write the proper css for media="print". And why crop images using css? Crop it using photoshop.
EMaks
 
Posts: 14
Joined: Wed Nov 24, 2010 10:32 am

Re: Printing CSS "Cropped" Images

Postby HotNoob on Thu Nov 25, 2010 5:24 pm

he's making an online image cropping service...
there are tons of websites that do that...
HotNoob
100+ Club
 
Posts: 169
Joined: Sun May 02, 2010 1:38 am

Re: Printing CSS "Cropped" Images

Postby EMaks on Thu Nov 25, 2010 6:44 pm

Ok, I see... I've just tried this code and everything goes alright. In FF and IE print preview shows cropped image, just as on the webpage. Maybe you have another css or html code that affects this image...
EMaks
 
Posts: 14
Joined: Wed Nov 24, 2010 10:32 am


Who is online

Users browsing this forum: No registered users and 2 guests