Skip to content Skip to sidebar Skip to footer

How To Put Elements To Same Row

html5 order print form below is created from existing template which contains fixed layout fields. Every field appears in separate row: How to fix this so that fields appear in sa

Solution 1:

First of all I recommend reading up on some basic HTML, tables specifically. To display elements in a line without any changes in the html there are 2 approaches:

  1. display: inline; or display: inline-block; (inline-block makes the element appear in a line while keeping the benefits of a block level element)
  2. float: left;

Both of the CSS rules have to be applied to all the elements you want to display in a row, preferrably by a rather specific selector like .list-element which would target all elements with the class list-element or #mylist > div which targets all div elements that are direct descendants of the element with id mylist.


Post a Comment for "How To Put Elements To Same Row"