Skip to content

A CSS only solution for message bubbles with timestamps either after or below depending on length

License

Notifications You must be signed in to change notification settings

TomasHubelbauer/css-message-bubble

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

CSS Mesage Bubble

In this repository I try to figure out a CSS only way to get a message bubble with the following behavior:

DEMO

  • When the message and stamp fit both on the same line, have them share the line and align the stamp to the right
  • When they cannot both fit on the same line, have the text take full width (of possibly multiple lines)
    • The stamp sits on its own line
    • Even if the last line of the text is short enough to have been able to fit the stamp, the stamp still has its own line

To-Do

About

A CSS only solution for message bubbles with timestamps either after or below depending on length

Topics

Resources

License

Stars

Watchers

Forks