user5656315
user5656315

Reputation:

How to make the size of the div to the number of letters

Hi guys I am working on a chat program...

div image

I want this div's size like :

wanted div image

Upvotes: 0

Views: 28

Answers (1)

Andreyu
Andreyu

Reputation: 454

Try adding this to their CSS:

  float:left; /*or right*/
  clear:both;

See this fiddle for an example with alternating positions: https://jsfiddle.net/ujpyxm22/1/

Upvotes: 1

Related Questions