?
Solved

How do I clip these images?

Posted on 2012-09-17
2
Medium Priority
?
235 Views
Last Modified: 2012-09-24
I've got a screen shot of my currently pathetic attempt to clip a series of images using the css clip property.

I've played with this for a while now and concluded that I need to appeal to the ninjas.

Here's my CSS:

.crop{
     float: left;
  margin: 0 10px 0 0;
  position: relative;
  width: 70px;
  height: 70px;
  border: solid 1px #000;
}
   
.crop img{
 width: 100px;
  height: 70px;
  position: absolute;
  clip: rect(0 85px 70px 15px);
  left: -15px;
}

...and here's my HTML:

<td div class="crop">
<a href="http://www.facebook.com/fbuid=<?php echo $row['voter_id']; ?>" target="_blank"><fb:profile-pic uid="<?php echo $row['voter_id']; ?>" width="45" border="0"></fb:profile-pic></div>

I want a series of 45px X 45px squares and instead I get these rectangles and I don't know what I'm doing wrong.

Tcss catastrophehoughts?
0
Comment
Question by:brucegust
2 Comments
 
LVL 30

Accepted Solution

by:
LZ1 earned 1500 total points
ID: 38409489
Is there a live URL we can view? Generally the clip property only works on absolute positioned elements.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is a how to build your own CSS3 slideshow and when I say CSS3 I mean just CSS with no javascript in sight! There a few examples online of how to do this but most just show you an example without any explanation, others make it more complicat…
Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
In this tutorial viewers will learn how add a full-size background image to a webpage using CSS3. Create a new HTML document with an internal stylesheet.: In CSS, define the html element to have a background image. Use a high resolution image.: In t…
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…
Suggested Courses
Course of the Month14 days, 6 hours left to enroll

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question