How to align pictures horizontally? To go one by one?

<div style="width: 20%; float: left; text-align: left; padding: 1.5cm 0 0 "> <:#cart_pay_receiver_director_title^html/>:<br/><:#cart_pay_receiver_accounter_title^html/>: </div> <div style="width: 40%; float: left; text-align: center"> </div> <img src="/attach/chekushkinia.gif"> <img src="/attach/stamp.gif"> </div> <div style="width: 20%; float: left; padding: 1.5cm 0 0 0"> </div> (<:#cart_pay_receiver_director_name^html/>)<br />(<:#cart_pay_receiver_accounter_name^html/>) </div> т.е. чтоб все было в одну строчку. как это сделать? 
  • lead all the styles into css classes, then you yourself will suffer - makregistr
  • The answer is actually not. It was necessary to group the divas and align them. - new_russian_man

3 answers 3

You need to read this article , with the help of this advice, you can line up the elements that will adjust to each other’s dimensions and not “fake” one for one if you use float: left.

    First, the extra closing / div after images and at the end, the transfer of the br / tag, and second, that everything would be in one line - add to this bydlokod in each div another parameter "display: inline;", and to the pictures also.

      Thrust everything into the table or set the parent element style='white-space:nowrap' . If you allow the possibility of transfer, then float:left enough.

      • one
        IMHO, a bad idea to make up tables. - metazet
      • About the block-table layout heard? - ling
      • Of course, I heard, but everything that can be wrapped up with blocks is better to impose with blocks. - metazet
      • What looks like a table, you need to impose a table. Divine fans drive me crazy when they proudly show <pre> <div class = "td"> text </ div> <div class = "td"> text </ div> <div class = "td"> text < / div> </ pre> and 15kb css to make it work as it should. - Sh4dow
      • @ Sh4dow, totally agree with you! But popping the table wherever it goes is bad too. - metazet