Skip to content Skip to sidebar Skip to footer

Arrange Block Elements In A Single Horizontal Line

I dont know, either I am not that good in the art of 'search' or this topic is so so simple that nobody generally asks this but I have been searching this ever since i started my w

Solution 1:

You can try display:inline-block or float:left.

<html><head><styletype="text/css">div {
      border: 1px black solid;
      }
    </style></head><body><div>aaa</div><div>bbbbbb</div><div>cccc</div></body></html>

enter image description here

<html><head><styletype="text/css">div {
      border: 1px black solid;
      display: inline-block;
      }
    </style></head><body><div>aaa</div><div>bbbbbb</div><div>cccc</div></body></html>

enter image description here

<html><head><styletype="text/css">div {
      border: 1px black solid;
      float: left;
      }
    </style></head><body><div>aaa</div><div>bbbbbb</div><div>cccc</div></body></html>

enter image description here

These are the effects on Chrome.

Post a Comment for "Arrange Block Elements In A Single Horizontal Line"