homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderators: not2easy

CSS Forum

Three to Two line
Convert Three line product name to Two lines

5+ Year Member

Msg#: 3973907 posted 6:54 am on Aug 18, 2009 (gmt 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.



5+ Year Member

Msg#: 3973907 posted 6:19 am on Aug 19, 2009 (gmt 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]


10+ Year Member

Msg#: 3973907 posted 2:44 pm on Aug 20, 2009 (gmt 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.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved