Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2010-02-05 23:46:07

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

any category listing, any plugin, breaks at the blank between words

I have been able to get around this by using an underscore to connect each word in the category titles.

But it doesn’t look good.

my site

Just look on the right hand side of the above page.

Offline

#2 2010-02-06 00:35:27

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: any category listing, any plugin, breaks at the blank between words

A couple of ways you could approach this. Your sidebar has a fixed width and it is not wide enough to avoid line wrapping with your category titles. So some combination of reducing margins and/or font size and increasing the sidebar width may be all you need.

Or you could use non-breaking spaces between words in your category titles. Use rah_replace to do the substitution.


Code is topiary

Offline

#3 2010-02-06 01:20:01

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

Re: any category listing, any plugin, breaks at the blank between words

Jim, have you tried to cook following Els’ recipe?


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

Offline

#4 2010-02-06 02:56:16

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

Re: any category listing, any plugin, breaks at the blank between words

uli wrote:

Jim, have you tried to cook following Els’ recipe?

Yes, didn’t seem to have an effect. I did a page reload, etc. No change I could see.

Hmm. If I remember the css correctly, the entire page is 770 pixels wide. I have no problem changing it to 1024 pixels wide. I can change that and see what happens.

Offline

#5 2010-02-06 03:05:59

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

Re: any category listing, any plugin, breaks at the blank between words

jsoo wrote:

A couple of ways you could approach this. Your sidebar has a fixed width and it is not wide enough to avoid line wrapping with your category titles. So some combination of reducing margins and/or font size and increasing the sidebar width may be all you need.

Or you could use non-breaking spaces between words in your category titles. Use rah_replace to do the substitution.

My part:

I connected the words in some category titles with underscores _ and they don’t wrap. Some that do wrap are less wide than those that don’t wrap.

I read the plugin help and … it seems to be for something else. So if you would please explain how to use that plugin to get the no wrap in category titles, I would appreciate it. I know a small bit of css and even less php.

Offline

#6 2010-02-06 03:08:57

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

Re: any category listing, any plugin, breaks at the blank between words

You need to change both #container and #sidebar-2. My trial with Firebug worked.


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

Offline

#7 2010-02-06 03:21:07

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: any category listing, any plugin, breaks at the blank between words

My, the default Txp stylesheet is showing its age. Box model hack, fer cryin’ out loud…

In Presentation->Style, find this:

#container {
	margin: 10px auto;
	padding: 10px;
	width: 760px;
}

Increase the width. Then find this:

#sidebar-1, #sidebar-2 {
	padding-top: 50px;
	width: 150px;
}

Change it to this:

#sidebar-1 {
	padding-top: 50px;
	width: 150px;
}
#sidebar-2 {
	padding-top: 50px;
	width: 150px;
}

and then increase the #sidebar-2 width by the same amount you increased the #container width.

Then add this:

#sidebar-2 ul {
	list-style: none;
	margin-left: 0;
}
#sidebar-2 ul ul { margin-left: 1em; }

See where that gets you.

Learn to use the Firefox web development tools, or the WebKit inspector, so that you can see the actual size of your elements overlaid on the page.


Code is topiary

Offline

#8 2010-02-06 04:00:14

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

Re: any category listing, any plugin, breaks at the blank between words

uli wrote:

You need to change both #container and #sidebar-2. My trial with Firebug worked.

I did. I changed container to 1024 and sidebar-2 to 300.

Offline

#9 2010-02-06 04:14:21

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

Re: any category listing, any plugin, breaks at the blank between words

jsoo wrote:

My, the default Txp stylesheet is showing its age. Box model hack, fer cryin’ out loud…

In Presentation->Style, find this:

#container {
	margin: 10px auto;
	padding: 10px;
	width: 760px;
}

Increase the width. Then find this:

#sidebar-1, #sidebar-2 {
	padding-top: 50px;
	width: 150px;
}

Change it to this:

#sidebar-1 {
	padding-top: 50px;
	width: 150px;
}
#sidebar-2 {
	padding-top: 50px;
	width: 150px;
}

and then increase the #sidebar-2 width by the same amount you increased the #container width.

Then add this:

#sidebar-2 ul {
	list-style: none;
	margin-left: 0;
}
#sidebar-2 ul ul { margin-left: 1em; }

See where that gets you.

Learn to use the Firefox web development tools, or the WebKit inspector, so that you can see the actual size of your elements overlaid on the page.

Me:

I changed the sidebar-2 width to 500 pixels. It gives lots of room. But the categories with blanks between each word still gives one word of the title per row on some categories.

One such example from my site would be:

Grand
Duchy
of
the
Royal
Moonraker

I think that if it was a room problem, ‘of’ and ‘the’ of the above example from my site would be on the same line as Moonraker takes up enough width that ‘of the’ should be on one line, but they are on separate lines instead.

I have no idea what a ‘non-breaking’ space might be. I use the spacebar on my keyboard. So, please forgive my ignorance.

Offline

#10 2010-02-06 04:18:34

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: any category listing, any plugin, breaks at the blank between words

Add padding-left: 0; to #sidebar-2 ul. Then add:

#sidebar-2 ul li {
	margin-left: 0;
	padding-left: 0;
}

That should get you closer.


Code is topiary

Offline

#11 2010-02-06 04:21:39

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: any category listing, any plugin, breaks at the blank between words

And get rid of the box model hack rules:

	\width: 150px;
	w\idth: 150px;

and so on. Either that, or update their values accordingly (to match the increased widths for #container and #sidebar-2).


Code is topiary

Offline

#12 2010-02-06 04:24:09

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: any category listing, any plugin, breaks at the blank between words

JimJoe wrote:

I have no idea what a ‘non-breaking’ space might be. I use the spacebar on my keyboard. So, please forgive my ignorance.

No worries. Non-breaking space is an HTML entity,  . It outputs a space but won’t allow a line break. I think you’ll be better off getting the CSS widths adjusted as you need them; don’t worry about rah_replace for now.


Code is topiary

Offline

Board footer

Powered by FluxBB