homepage Welcome to WebmasterWorld Guest from 54.198.130.203
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderator: open

CSS Forum

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




msg:3973909
 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.

 

ganeshgrowth




msg:3974772
 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]

PSWorx




msg:3975661
 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