Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. [Message Deleted]

[Message Deleted]

Scheduled Pinned Locked Moved Web Development
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    CodeAddiction
    wrote on last edited by
    #1

    [Message Deleted]

    S 1 Reply Last reply
    0
    • C CodeAddiction

      [Message Deleted]

      S Offline
      S Offline
      Shog9 0
      wrote on last edited by
      #2

      You have a few choices:

      1. Use Javascript to calculate the actual pixel width of the text after it's been displayed, and set that as the minimum width of the container.
      2. Specify the minimum width in em units, as the length of the string. This will actually be wider than the minimum required (unless your titles all consist of a varying number of 'M' characters), but might work just fine if you don't have really long titles and don't mind a bit of extra space.
      3. Allow the text to wrap, and specify a minimum width that ensures it won't become so narrow as to look ridiculous (say, 10em). This might break your layout in other ways though.
      4. Set the overflow style on the container to hidden. This will just clip any text that runs past the end of the box. Depending on what you're going for, this might work... it's what actually happens in a Win32 window caption, so you'd have authenticity at least.
      5. Use a TABLE. This only really helps if you don't force it to be smaller than it needs to be though.

      But who is the king of all of these folks?

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups