Welcome to WebmasterWorld Guest from 54.161.95.0

Forum Moderators: not2easy

Message Too Old, No Replies

Three to Two line

Convert Three line product name to Two lines

     
6:54 am on Aug 18, 2009 (gmt 0)

Junior Member

5+ Year Member

joined:July 6, 2009
posts: 58
votes: 0


I have a problem with product names on the website.

Some product names are so long that it flows to the third line. But when that flow to the third line the page design spoils. I needed to know a possible work around.

6:19 am on Aug 19, 2009 (gmt 0)

Junior Member

5+ Year Member

joined:July 6, 2009
posts: 58
votes: 0


I've found a solution here [webmasterworld.com...]

.text {
width: 100px;
height: 15px;
max-height: 15px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}

But this ends by the first line itself. Also, "..." is only seen in IE and not in Firefox

[edited by: SuzyUK at 7:47 am (utc) on Aug. 19, 2009]
[edit reason] removed '.' to fix the link [/edit]

2:44 pm on Aug 20, 2009 (gmt 0)

Junior Member

10+ Year Member

joined:Aug 25, 2003
posts:175
votes: 0


Either javascript to cut down the text on page load or use php/asp/.net/perl etc if you can to process the cut down server side, a quick search relating to string functions for either languages will get you whats needed.