Keyword

Image in K2 article has white background

  • William Gollinger
  • William Gollinger's Avatar Topic Author
  • Offline
  • New Member
More
12 years 11 months ago - 12 years 11 months ago #57683 by William Gollinger
Image in K2 article has white background was created by William Gollinger
I have a .png file with a transparent background, but when I put it in a K2 article the background becomes white.

I found these two threads with solutions:

community.getk2.org/forum/topics/white-background-showing-for
community.getk2.org/forum/topics/pngs-transparency-not

The solutions are not working for me, unfortunately.

When I inspect the image, it tells me that k2.css has the following line, making the background white:
div.itemFullText img {padding:2px;margin:4px;background:#fff;border:1px solid #666;}

But when I open k2.css in a text editor I find
div.itemFullText img {}
so there is nothing to edit.

Searching the file for the word "background" I deleted backgrounds from as many "img" tags as I could (after making a copy of the original file, of course), but it still shows up with a white background. I even added "background:none;" to div.itemFullText img {}, but still nothing.

What am I missing? Is this container type inheriting properties from something I can't see? Are there more than one k2.css I should be looking in?

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

  • Kannan Naidu Venugopal
  • Kannan Naidu Venugopal's Avatar
  • Offline
  • Platinum Member
  • Aham Brahmasmi
More
12 years 11 months ago #57684 by Kannan Naidu Venugopal
Replied by Kannan Naidu Venugopal on topic Re: Image in K2 article has white background
Hi William Gollinger,

I believe you're using the image tab to upload the images when adding items. K2 converts all images uploaded from the image tab to jpg.

See here

K2 Rocks \m/

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

  • William Gollinger
  • William Gollinger's Avatar Topic Author
  • Offline
  • New Member
More
12 years 11 months ago - 12 years 11 months ago #57685 by William Gollinger
Replied by William Gollinger on topic Re: Image in K2 article has white background
Thanks! I'll make sure to only add images with the editor.

I found the real source of my problem: I was editing k2.css in the com_k2 folder, but the file which had the background settings was k2.css in my template's css folder.

Stupid mistake, but it's easy to make!

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

  • Kannan Naidu Venugopal
  • Kannan Naidu Venugopal's Avatar
  • Offline
  • Platinum Member
  • Aham Brahmasmi
More
12 years 11 months ago #57686 by Kannan Naidu Venugopal
Replied by Kannan Naidu Venugopal on topic Re: Image in K2 article has white background
You're welcome. Well, it's not just you...i've done similar things before :P

K2 Rocks \m/

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


Powered by Kunena Forum