product img div overlaps price-no responsive code?

  • Posts: 24
  • Thank you received: 0
10 years 2 weeks ago #212534

-- url of the page with the problem -- : www.hotpicksusa.com
-- HikaShop version -- : 2.5.0
-- Joomla version -- : 3.4.3

Similar is scope to this thread: www.hikashop.com/forum/product-category-...ile-view.html#200027

I am having a very similar issue in the desktop size, until the media size drops to the point the pricing and info falls below the main image. This is because the images are using 400 pixels square as size in the admin as the default.

I have tried every CSS hack and modification I can think of on not only the "display" via the hikashop admin but also the front end stylesheet. I did find where to add some padding on the left side of the pricing div but it only works for the full desktop size. When I look at an iPad in landscape mode, and the column sizes start squeezing together, it would still revert back to overlapping.

Ideally, the best fix for this would be somehow to apply a z-index where the image was set negative and the price div set positive so the price div always remained on top if it overlaps. z-index is obviously coming in to play somewhere because the image overlaps the text.

On the other hand... why aren't the images for the products done per bootstrap? You use one large image, and every screen rendering uses the bootstrap: class="img-responsive" code to re-size on the fly? I need to have my images show up as large as possible at any screen resolution because the products themselves are so small.

Thank you for any help with this!

Attachments:

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

  • Posts: 26274
  • Thank you received: 4045
  • MODERATOR
10 years 2 weeks ago #212601

Hi,

If your images are 400px width ; you should modify the product page layout in order to give 400px for the image display.
In that case, displaying the price and the quantity selector might be place below (depending the total width you allow for the global product page).

But yes, if the container is less than 400px width and the image is bigger ; the image will overlaps the container, unless you place a CSS rule like explained in the other thread.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 24
  • Thank you received: 0
10 years 2 weeks ago #212663

OK, so my question is where exactly do I modify the code to make sure the left side container is at least 400 pixels? I looked through every style sheet and the code but could not find where to edit the code to affect this?

But that also comes back to my additional question. If this container (div?) for the image is being hard coded to 400 pixels, that works for desktop, but is too big for tablet and mobile I would think. Shouldn't there be a better solution using the responsive attributes (img-responsive) via bootstrap so the image re-sizes based on viewport window size?

Do the cart templates you use that we can buy take this into consideration and work better than the default settings? We just want the best most elegant solution, even if it costs a bit more money.

Thank you!

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

  • Posts: 26274
  • Thank you received: 4045
  • MODERATOR
10 years 2 weeks ago #212676

Hi,

You can edit the HikaShop CSS or modify the HikaShop product page.
That documentation will help you to know how override the CSS or which view you have to edit :
www.hikashop.com/support/support/documen...the-display.html#css

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 24
  • Thank you received: 0
10 years 2 weeks ago #212691

OK, I tried every place in the code possible to make the page display differently by hard coding width=400px in

Product --> show_block_img

Nothing I changed by hardcoding affected the overlap.

Plus a change like this means if I ever have to change the image size in the admin, I would have to remember to change this hard code, and that doesn't seem right.

I am still not understanding why this left DIV holding the image is overlapping the right area. Why is it not pushing the right DIV more to the right? It seems your code was not designed to accommodate images past a certain size? Is there not a way to just change the z-index so if there is overlap, the text on the right always displays over the top of any image? That seems to make the most sense and eliminate any hard coding?

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

  • Posts: 84305
  • Thank you received: 13700
  • MODERATOR
10 years 2 weeks ago #212906

Hi,

It not that the default design is not made to accommodate bigger images. It's that the image compared to the width allowed by the layout of the template is too small for the image size you're using and that the template is shifting to responsive only on smaller sizes of screens. So it's not something we can anticipate in HikaShop's code.

What you want is to add such code:
@media (max-width: 1200px){
.row-fluid .span6 {
width: 100%!important;
}
}
in order to counter the responsive code of the template which is not adapted to the situation.
Hacking the width of the image on the product page is not a good solution I believe.

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

  • Posts: 24
  • Thank you received: 0
10 years 2 weeks ago #212911

Thank you for this solution! I just need to know where to put this code so it over-rides what's there already... Should I replace the @media css in the front end style sheet? Place it at the end to over ride the existing @media css? Put it in the code section via he admin for show_block_img in a style tag?

Also, I am not saying hack the image width. I am meaning instead of indicating any pixel width at all, bootstrap uses the built in class style img-responsive which fills the existing div and then as the div shrinks, so does the image? I am just not understanding why you are using a section in the admin to pre-determine default image height/width when what makes more sense is to say product images should be at least xxx pixels by xxx pixels and let bootstrap and responsive handle the image fitting properly at any screen size? Or is this already the case if you leave image height and width blank if your template uses the responsive option to display images?

Thank you!

Last edit: 10 years 2 weeks ago by stephani.

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

  • Posts: 84305
  • Thank you received: 13700
  • MODERATOR
10 years 2 weeks ago #212939

Hi,

You can put it in the frontend CSS file yes.

A img-responsive class is not a solution. Suppose that you have an image of 2000*3000px but that you want to display the thumbnail on the product page as a 200*300px image. If you just do it with such class, your browser will have to download the full size image in order to then resize it on display.
What the image size system in HikaShop does is that it creates a smaller version of the original image with the exact size you want to properly fit the space when you have enough space.
That way, the download of the image when the product page is displayed is much faster (which is your first priority on mobile devices).
Then, you can still tell the system to adapt the image width and height with simple CSS. You don't need to modify any view. And in most cases, you don't need any CSS as the image size is ok enough there to fit properly on mobile devices on bootstrap templates.

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

  • Posts: 24
  • Thank you received: 0
10 years 2 weeks ago #213055

I added this code at the end of the Front-End CSS file so it should over-ride anything previous... it didn't change anything?

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

  • Posts: 84305
  • Thank you received: 13700
  • MODERATOR
10 years 1 week ago #213078

Hi,

I do see the change on your website. On this page:
www.hotpicksusa.com/hotpicksusa/online-s...individual-pick.html
Now, no matter the resolution of my screen, the image never overlaps the text of the right side of the product page.
That was the concern you had as far as I can see.

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

Time to create page: 0.069 seconds
Powered by Kunena Forum