0

I have a line of text that wraps to the next lines in a fixed width container that looks like this:

Citizens Bank / Greenline Ventures / Local Initiatives Support Corporation (LISC) / Nortridge Software Company / Ohio Capital Corporation for Housing / Oppenheimer Multifamily Housing & Healthcare Finance / PIDC/Portfol / PolicyMap 

I believe the width is something like 250 pixels wide. Is there anywhere to ensure that when it wraps to the next line, it doesn't start with a /? For example, If this were to happen...

Citizens Bank / Greenline Ventures / Local Initiatives Support Corporation (LISC) / Nortridge Software Company / Ohio Capital Corporation for Housing / Oppenheimer Multifamily Housing & Healthcare Finance / PIDC/Portfol / PolicyMap 

It would need to change it so that the (LISC) is on the next line down and in front of the / like so:

Citizens Bank / Greenline Ventures / Local Initiatives Support Corporation (LISC) / Nortridge Software Company / Ohio Capital Corporation for Housing / Oppenheimer Multifamily Housing & Healthcare Finance / PIDC/Portfol / PolicyMap 

This is being sent out in an email, so can't use PHP, or anything other than CSS and HTML. I was thinking of using white-space: pre, this this has too many flaws in it, in the sense that it tends to break up the words too much to the next line, for example like this:

Citizens Bank / Greenline Ventures / Local Initiatives Support Corporation (LISC) / Nortridge Software Company / Ohio Capital Corporation for Housing / Oppenheimer Multifamily Housing & Healthcare Finance / PIDC/Portfol / PolicyMap 

Where I get strange results from using white-space: pre within a <span> tag on text.

Also, not sure why, but the <pre> tag is not a suitable answer either. For some reason, wrapping the text within a <pre> tag does not always work. Maybe a another solution? I think we have to think more aggressive when it comes to laying out things in an email.

1 Answer 1

2

Use a non-breaking space in the HTML for the space between the text and the slash. Then use a normal space for the space after the slash.

Citizens Bank&nbsp;/ Greenline Ventures&nbsp;/ ... 
Sign up to request clarification or add additional context in comments.

1 Comment

Wow, unbelievable, it's just that simple! Thank you!

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.