- Posts: 47
COMMUNITY FORUM
Same high text blocks
- lukass2000
-
Topic Author
- Offline
- Senior Member
text blocks as in the screenshot?Ideal would be if the text would automatically end after a
certain number of letters and is displayed only "Read more...".It should
therefore all the text blocks have the same height.
or can you say me, how can i make this:
THANK YOU!!!
Please Log in or Create an account to join the conversation.
- Jiliko.net
-
- Offline
- Platinum Member
- Posts: 567
It's just a question of category configuration in K2 and some css stuff but sure, K2 can do this...
For the first example, just configure a menu item with a k2 category configured with the right # of items and the right # of columns. Just have to work on the css of the category to have what you want.
For the second, it's almost the same :-)
I'm not a designer but i can tell you more on where to configure that and which files to modify if you want.
Olivier
Please Log in or Create an account to join the conversation.
- lukass2000
-
Topic Author
- Offline
- Senior Member
- Posts: 47
How can i find "right"?
I have created a new category, but I find no possibility "right" to choose?
Or there is a choice only if the CSS is changed?
THANK YOU!
Jose
Please Log in or Create an account to join the conversation.
- Jiliko.net
-
- Offline
- Platinum Member
- Posts: 567
In the category details, in parameters, just configure for leading, primary or secondary the count of item and the number of columns.
Create an item menu that links to this category.
You should now have the beginning of a solution.
After, it's just some css stuff to do in the default k2.css file or in the file of the k2 template you have chosen.
Olivier
Please Log in or Create an account to join the conversation.
- lukass2000
-
Topic Author
- Offline
- Senior Member
- Posts: 47
Have now done everything.
But I still understand not as I get the picture to the left side?
Or must also be made in the CSS file?
THANK YOU!
Please Log in or Create an account to join the conversation.
- Jiliko.net
-
- Offline
- Platinum Member
- Posts: 567
Modify the 'components/com_k2/css/k2.css' file,
To get the picture on the left in the items list :
Line 388 :
div.catItemImageBlock {
margin:0 0 16px;
padding:8px;
float:left;
}
To get the picture on the left in the item page :
Line 182 :
div.itemImageBlock {
margin:0 0 16px;
padding:8px;
float:left;
}
Olivier
Jose Luka said:Hi Olivier!
Have now done everything.
But I still understand not as I get the picture to the left side?
Or must also be made in the CSS file?
THANK YOU!
Please Log in or Create an account to join the conversation.
- lukass2000
-
Topic Author
- Offline
- Senior Member
- Posts: 47
It works great :) :) :)
Have a screenshot attached.
Can you tell me why the distance is below the picture so big ('ve marked in red)?
Can this be changed too?
THANK YOU!
Please Log in or Create an account to join the conversation.
- Jiliko.net
-
- Offline
- Platinum Member
- Posts: 567
I think it comes from this line in the div.catItemImageBlock css :
margin:0 0 16px;
Just have to decrease the bottom margin (16) and it should be right.
Olivier
Jose Luka said:Hi Olivier!
It works great :) :) :)
Have a screenshot attached.
Can you tell me why the distance is below the picture so big ('ve marked in red)?
Can this be changed too?
THANK YOU!
Please Log in or Create an account to join the conversation.
- lukass2000
-
Topic Author
- Offline
- Senior Member
- Posts: 47
YOU ARE THE BEST!!!!
The distance is still not completely gone, but much much better :) :) :)
Is it possible, that the "blocks (contributions)" have the same height?
THANK YOU!
Please Log in or Create an account to join the conversation.
- Jiliko.net
-
- Offline
- Platinum Member
- Posts: 567
For that, you have to apply a min height to the item block :
div.itemContainer { //This already exists line 357
min-height: 120px; //change the value to fit your needs, the div will have a height not less than 120px in this case.
}
The problem is that 'min-height' is not interpreted by ie.
another solution that works for all is this one :
Jose,
For that, you have to apply a min height to the item block :
div.itemContainer {
height: 120px;
overflow:hidden;
}
With that solution, all the html that is out of the div will not be displayed. So, you have to be sure that images are not too big & text is not too long...
Olivier
Jose Luka said:Hi Olivier!
YOU ARE THE BEST!!!!
The distance is still not completely gone, but much much better :) :) :)
Is it possible, that the "blocks (contributions)" have the same height?
THANK YOU!
Please Log in or Create an account to join the conversation.
- lukass2000
-
Topic Author
- Offline
- Senior Member
- Posts: 47
I just test if I am back from work at home :)
Could there also to every post put a frame?
Then everything would be perfect
THANK YOU!
Please Log in or Create an account to join the conversation.
- lukass2000
-
Topic Author
- Offline
- Senior Member
- Posts: 47
Have now added the following
border:1px solid #ddd;
Now I get a border around each aktikel,
but it did nothing displays in two columns.
Everything is shown in a flat.
If I take away the frame, it is back together.
What can I do?
Thank you :)
Please Log in or Create an account to join the conversation.
- Simon Wells
-
- Offline
- Platinum Member
- Posts: 955
Just to expand on Oliviers great support.
You might want to consider creating a k2 template over ride instead of modifying the main k2 css file. That way, if you upgrade K2 later, you would loose your changes.
Details of setting up a K2 template can be found in the guides on simon.getk2.org.
You say you added that border css, but what did you add it to and which part do you need to have a border on?
I would like to suggest that if you are using FireFox, you get the add on called FireBug, as it will all you to inspect the page and see any css element, which will help identify it and which file to modify.
Simon
K2 Support
Please Log in or Create an account to join the conversation.
- Jiliko.net
-
- Offline
- Platinum Member
- Posts: 567
Adding border increases catItem block width,that's why, i think, you now have only 1 column.
You have to play with margin, padding and width to go back to 2 columns.
Olivier
Please Log in or Create an account to join the conversation.
- lukass2000
-
Topic Author
- Offline
- Senior Member
- Posts: 47
The "problem" with tehe update i understand ;)
Can you tell me what I must change at the template (which in what php-file), so I like the presentation in the screenshot above get?
THANK YOU!
Please Log in or Create an account to join the conversation.
- lukass2000
-
Topic Author
- Offline
- Senior Member
- Posts: 47
community.getk2.org/notes/Templating_in_K2
I named the folder test an blog.
Under categories i see the templates,
but no matter what I select, it changes nothing.
According to the documentation at BLOG change something, or???
Should not the k2.css file copied to the new folder?
THANKS!
Please Log in or Create an account to join the conversation.
- coolweb
-
- Offline
- New Member
- Posts: 5
if word > 20
show read more
close div
Please Log in or Create an account to join the conversation.