Announcement

Collapse
No announcement yet.

Multiple lines be the same width

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
    OneChance
    Member

  • OneChance
    replied
    Ohhhhh, I see. No, there's no way to do what you want with HTML. There is no logic to HTML. You'd need to determine the width of the cell by calculating the length of the text, then size the cell accordingly in some forced manner taking into account screen resolution and browser window size (not everyone maximizes). And I don't think it's possible to do that.

    Leave a comment:

  • JJR512
    Senior Member

  • JJR512
    replied
    I will assume that "Eh?" means "I'm sorry, I don't understand, could you please explain better?".

    Suppose you have a table cell. You have some text in the cell. Regardless of if its centered or right or left justified, if the text would be wider than the cell, it will wrap to a new line. The first line, and each line except the last line, will always take up as much width of the cell as possible.

    Now I have some text in a cell that happens to take up two lines. What wraps to the second line is not enough to fill it up. This text, by the way, is centered. So I have a full-width line of text, and under that, the remainder takes up half a line. I'd like for the width of both lines of text to be the same. I'd like it to look balanced.

    Now I don't want to adjust the width of the cell so that the text is forced to balance, because the text is dynamic. It changes. Also, my users use different resolutions. For people using narrower resolutions, the table might force horizontal scrollbars. For people with wider resolutions, they might be able to have the text all on one line. That won't happen if I force the width of the cell.

    So I was hoping there was some kind of HTML tag or something that would make text balance out in width over multiple lines.

    I hope that is a better explanation.

    Leave a comment:

  • OneChance
    Member

  • OneChance
    replied
    Eh?

    Leave a comment:

  • JJR512
    Senior Member

  • JJR512
    started a topic Multiple lines be the same width

    Multiple lines be the same width

    If I have two lines of text in a table cell, and the lines are both centered, is there a way to make both lines be the same length?

Related Topics

Collapse

Working...
X