Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2013-11-02 14:53:10

JimJoe
Member
From: United States
Registered: 2010-01-30
Posts: 492
Website

word wrap on category page ?

I realize it is probably in the style sheet, but I cannot figure out what to change.

Category entries on the category page word wrap at about column 15.

I would like to move that wrap over to column 40 or 45. Looks like I’ll have to remove two columns as well. File categories and Image categories at the top of that php page.

I found the txp_category.php page, and see how I can remove the columns at the top of the page I don’t use.

Only thing left is to widen the Article Categories column.

Thanks !

Offline

#2 2013-11-02 15:15:17

JimJoe
Member
From: United States
Registered: 2010-01-30
Posts: 492
Website

Re: word wrap on category page ?

Ah, that centered the category list on that page.

How do I move it back over to the left side ?

Thanks.

Offline

#3 2013-11-02 16:10:04

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,207

Re: word wrap on category page ?

Don’t change anything in the .php files (revert any changes or replace by the original file!), do it in CSS instead. Choose the style sheet that belongs to your theme (textpattern/theme/your_theme_name/textpattern.css) and add this to the bottom of the style sheet:

.category-list .image,
.category-list .file  {
	display: none;
	}

In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#4 2013-11-02 17:00:19

JimJoe
Member
From: United States
Registered: 2010-01-30
Posts: 492
Website

Re: word wrap on category page ?

Done, it looks much neater and easier to read now.

Thanks !

Offline

#5 2013-11-02 17:03:59

JimJoe
Member
From: United States
Registered: 2010-01-30
Posts: 492
Website

Re: word wrap on category page ?

Sorry, I didn’t scroll down the entire category list. There is still some word wrap.

Is there a way to fix that for a category column width of 50 characters wide ?

Offline

#6 2013-11-02 19:35:16

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,207

Re: word wrap on category page ?

JimJoe wrote:

Is there a way to fix that for a category column width of 50 characters wide ?

None, I’m afraid. You can add some CSS declarations for .category-list td, again to the bottom of the style sheet:

.category-list td {
     white-space: nowrap;
     display: block;
    }

white-space: nowrap alone would make the layout too wide for the window.
display: block will then handle that by stacking the two lists on top of each other, both full width.

If you’re not happy with the stacking effect, try only the first declaration. But you’ll then probably have to scroll horizontally.

Edit: Second display value should also be block.

Last edited by uli (2013-11-02 19:43:47)


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#7 2013-11-02 19:38:58

JimJoe
Member
From: United States
Registered: 2010-01-30
Posts: 492
Website

Re: word wrap on category page ?

I will try that and report back on what happened.

Offline

#8 2013-11-02 19:44:12

JimJoe
Member
From: United States
Registered: 2010-01-30
Posts: 492
Website

Re: word wrap on category page ?

With all 4 columns on the category list page, it still word wraps.

Offline

#9 2013-11-03 15:59:30

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,207

Re: word wrap on category page ?

I don’t quite understand: You still get four columns displayed with the above two rules or did you take out the display: none rule for .category-list .image/.file?

(Also: some Firefox versions need a -moz- prefix on the white-space property (i.e. -moz-white-space), and in Internet Explorers it doesn’t work at all.)


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#10 2013-11-03 18:50:27

JimJoe
Member
From: United States
Registered: 2010-01-30
Posts: 492
Website

Re: word wrap on category page ?

With the two above rules you suggested.

Offline

Board footer

Powered by FluxBB