Keyword

Problems with two columns - K2 and Bootstrap

  • Mats Arvendal
  • Mats Arvendal's Avatar Topic Author
  • Offline
  • Premium Member
More
11 years 4 months ago - 11 years 4 months ago #113155 by Mats Arvendal
Problems with two columns - K2 and Bootstrap was created by Mats Arvendal
I am trying to create a template based on Bootstrap and I have disconnected the K2 Styles CSS.
When I try two get a two column category view it all turns out a mess, i e the articles don't line upp horizontally, but squeezes in in any space allocated by the articles floating left. See allached image.


Attachment not found




How do I invoke some clr:both to make a nice horizontal alignment with two articles on a row instead of my chaotic layout?

Hope you understand my meaning.

Rgds
Attachments:

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

  • Yiota
  • Yiota's Avatar
  • Visitor
11 years 4 months ago #113156 by Yiota
By default K2 puts a clear div according to the number of columns you have set in the category parameters.
Have you made a template override for K2 component?
Are you sure the category parameters for the 2 column is set up correctly and the page you are viewing is the one with the correct parameters?
Could you provide a link to your site to check it out?

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

  • Mats Arvendal
  • Mats Arvendal's Avatar Topic Author
  • Offline
  • Premium Member
More
11 years 4 months ago - 11 years 4 months ago #113157 by Mats Arvendal
Replied by Mats Arvendal on topic Re: Problems with two columns - K2 and Bootstrap
Thanks for the reply.
I examined the clear divs added to the code after the row's second article. And I realised that I have missed to put the declaration:
.clr {clear:both;height:0;line-height:0;display:block;float:none;padding:0;margin:0;border:none;}
into my adjusted CSS file. So this solved my problem.

Since there are contradictiing CSS declarations when using K2:s own CSS together with Bootstrap, I deactivated the K2 CSS.
Overall I find it very tricky to deal with the great amount of CSS that comes out of Bootstrap and K2 CSS. Do you have any good advice on how to deal with this question? I have looked at some ready-made templates based on K2 and Bootstrap but they usually have an overdosis of module postions so I always end up creating my own template. I find Bootstrap pratical when it comes to responsive design, but perhaps you have some good advice?

Best regards

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


Powered by Kunena Forum