Skip to content
What I Broke

Let's take a look at what I've broken today

BlogAboutArchivesLinkedIn
24 May 2014Chris Owens

How to stop text taking up more than one line - CSS

GuidesWeb DesignWeb Development

Hey everyone,

Just a quick post on how to stop text taking up more than one line using only CSS:

.truncate {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

You can check it out using this fiddle: http://jsfiddle.net/wb5m7/
There’s also a great StackOverflow post: http://stackoverflow.com/a/572302/522859

//jsfiddle.net/wb5m7/embed/html,css,result/

TagsCSSCSS3guide
Previous postDuplicate type name within an assembly. - Entity FrameWork (EF)
Next postHow to Open the Same File Twice in Visual Studio

Find a fix

Topics

  • AWS35
  • Azure13
  • Errors146
  • Guides154
  • Robotics45
  • Web Development258
All categories

Archives

  • 20251
  • 20241
  • 202313
  • 202215
  • 202122
  • 202022
  • 201931
  • 201854
  • 201722
  • 20164
  • 201513
  • 201434
  • 201340
  • 201251
  • 201132

Chris Owens

Notes on programming, web development, and robotics.

Connect on LinkedIn
What I Broke · Chris Owens
RSSTagsLinkedIn