Keyword

Item images in category listing not responsive

  • JPACK
  • JPACK's Avatar Topic Author
  • Offline
  • Junior Member
More
9 years 7 months ago #140442 by JPACK
Hi,
I am trying to implement K2 in a template that does not have K2 support from the beginning. So far everything went as planned…….but then this;

When I view articles in a category view the images are not responsive (see link) eyereports.com/index.php/component/k2/itemlist/category/1-category-1

The images are overlapping if I view this on a tablet, mobile or just re-size my window on a computer. From what I have found out, I need to add “img-responsive” to the line that display the images.

If I inspect the image I can see the line is looking like this: <img style=”width:400px; height:auto;”………..bla bla bla </img>

If I change it to this: <img class=”img-responsive” style=”width:400px; height:auto;”………..bla bla bla </img>

Then it seems to work!

Where do I implement this in my code so all images behave like this? I haven´t been able to find where the image is called and how to change this.

Anybody got an idea?

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 7 months ago #140469 by Krikor Boghossian
Replied by Krikor Boghossian on topic Item images in category listing not responsive
You need to add
img { max-width: 100% }
in your template's stylesheet.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • JPACK
  • JPACK's Avatar Topic Author
  • Offline
  • Junior Member
More
9 years 7 months ago #140477 by JPACK
Working!

Thanks a lot.

Cheers,

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 7 months ago #140490 by Krikor Boghossian
Replied by Krikor Boghossian on topic Item images in category listing not responsive
You 're welcome Jesper :)

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum