Add a wrapper around the image

NancyDru - November 10, 2007 - 15:45
Project:Taxonomy Image
Version:5.x-1.x-dev
Component:User interface
Category:feature request
Priority:normal
Assigned:NancyDru
Status:closed
Description

I have been working to get other modules to include support for TI. The latest is the FAQ module.

However, this new usage produces lists and because the image sizes may not all be the same width, those lists can look ragged. To fix this, I coded up this little patch to add a wrapper <div> around the image. There is also a new setting to turn it on, so no one will have a broken implementation.

This allowed me to do this with my CSS:

.faq .taxonomy_image_wrapper {
  float: left;
  width: 70px;
  margin-bottom: 0.5em;
  padding: 0px 0px 0px 0px;
}

img.faq_tax_image {
  padding: 0px 0px 0px 0px;
}

So now everything lines up correctly.

This would also allow other little things, like putting a fancy border around it, or add a background color or frame.

AttachmentSize
tximg_wrapper.txt1.85 KB

#1

NancyDru - November 10, 2007 - 16:00
Status:active» needs review

#2

brewreview.info - November 11, 2007 - 18:20

Thanks for posting this -- works great!

This was exactly what I was looking for, to display my multiple taxonomy_images per node neat and orderly.

Cheers,
//TB

#3

NancyDru - February 5, 2008 - 22:40
Assigned to:Anonymous» NancyDru
Status:needs review» fixed

fix committed.

#4

Anonymous (not verified) - February 19, 2008 - 22:44
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.