Changing number of columns in responsive display
-- HikaShop version -- :HikaShop Business: 2.2.2
-- Joomla version -- : 3.1.5
-- PHP version -- : 5.3.1
-- Browser(s) name and version -- : Firefox 25.0.1
-- Error-message(debug-mod must be tuned on) -- : none
I am trying to build a responsive site and am using Joomla 3.1.5 with the Wright template framework which incorporates twitter bootstrap. I have a module published which show the newest products added to the shop and I can set the number of products displayed and the number of columns in the module configuration. I have set it to display four columns.
Currently if I reduce the screen width the the column widths reduce accordingly until such point as it jumps from four columns to a single column.
I am trying to achieve a more sophisticated behavior where the number of columns reduces at certain breakpoints. So as the screen width is reduced four columns narrow slightly then drop to three columns, then to two then one as the screen width is reduced.
Can you offer any suggestions as to how this might be achieved?
Many thanks,
Ian
Please Log in or Create an account to join the conversation.
code-tricks.com/css-media-queries-for-common-devices/
For example:
Please Log in or Create an account to join the conversation.
Top support once again.
Many thanks,
Ian
Please Log in or Create an account to join the conversation.
- Posts: 575
- Thank you received: 11
I had used your code to implement the 2 column on responsive view
but there is some problem
the first row on responsive is 2 column indeed, but the second row become 1 column with product and 1 blank
thrid row display fine but fourth row problem with 1 blank column again
is that related to clear property?
Please Log in or Create an account to join the conversation.
Yes. Probably because not all your elements have the same height.
We would need a link to the page you're talking about in order to analyze the situation and tell you what's going on.
Please Log in or Create an account to join the conversation.
- Posts: 575
- Thank you received: 11
We manage to resolve it by remove div style=clear:both in listing_div view and frontend css
Please Log in or Create an account to join the conversation.
www.artistpapers.co.uk/shop
In my template head area load the javascript (attached) with...
There may be better solutions but that worked for me.
Ian
Please log in or register to see it.
Please Log in or Create an account to join the conversation.
- Posts: 575
- Thank you received: 11
Specified class hikashop container and product name class (inspect element ti get the actual class name)
This should save the problem
Please Log in or Create an account to join the conversation.
- Posts: 575
- Thank you received: 11
Please see screem shot below
Please Log in or Create an account to join the conversation.
- Posts: 575
- Thank you received: 11
Please Log in or Create an account to join the conversation.
Next version of HikaShop will actually contain a height equalizer javascript in order to do that without the need of jquery.
Please Log in or Create an account to join the conversation.
- Posts: 575
- Thank you received: 11
Sorry that think we are far a bit from the question
MY problem above is related to height?
My display setting is using div with 3 column, however we need to remove the clear:both in order to have 2 column view with your code above in responsive view
but there are intermitten blank column as above
Please Log in or Create an account to join the conversation.
My last answer to you still stands:
Hi,
Yes. Probably because not all your elements have the same height.
We would need a link to the page you're talking about in order to analyze the situation and tell you what's going on.
Please Log in or Create an account to join the conversation.
Ian
Please Log in or Create an account to join the conversation.