--- id: bad87fee1348bd9aec908845 title: Allineare responsivamente gli elementi dei moduli con Bootstrap challengeType: 0 forumTopicId: 18225 required: - link: >- https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.2.0/css/font-awesome.css raw: true dashedName: line-up-form-elements-responsively-with-bootstrap --- # --description-- Ora mettiamo il tuo `input` e il `button` di invio del form sulla stessa linea. Lo faremo come in precedenza: usando un elemento `div` di classe `row`, e altri elementi `div` al suo interno usando la classe `col-xs-*`. Annida sia il l'`input` di testo che il `button` di invio all'interno di un `div` di classe `row`. Annida il tuo `input` di testo all'interno di un div di classe `col-xs-7`. Annida il tuo `button` di invio in un `div` di classe `col-xs-5`. Questa รจ l'ultima sfida che faremo per la nostra Cat Photo App per ora. Ci auguriamo che ti sia piaciuto imparare a usare Font Awesome, Bootstrap e il design responsivo! # --hints-- Il pulsante di invio del modulo e l'input di testo dovrebbero essere annidati in un div di classe `row`. ```js assert( $('div.row:has(input[type="text"])').length > 0 && $('div.row:has(button[type="submit"])').length > 0 ); ``` Il tuo input di testo del modulo dovrebbe essere annidato in un div di classe `col-xs-7`. ```js assert($('div.col-xs-7:has(input[type="text"])').length > 0); ``` Il pulsante di invio del modulo dovrebbe essere annidato in un div di classe `col-xs-5`. ```js assert($('div.col-xs-5:has(button[type="submit"])').length > 0); ``` Tutti i tuoi elementi `div` dovrebbero avere dei tag di chiusura. ```js assert( code.match(/<\/div>/g) && code.match(/
/g).length === code.match(/

CatPhotoApp

A cute orange cat lying on its back.
Three kittens running towards the camera.

Things cats love:

  • cat nip
  • laser pointers
  • lasagna

Top 3 things cats hate:

  1. flea treatment
  2. thunder
  3. other cats
``` # --solutions-- ```html

CatPhotoApp

A cute orange cat lying on its back.
Three kittens running towards the camera.

Things cats love:

  • cat nip
  • laser pointers
  • lasagna

Top 3 things cats hate:

  1. flea treatment
  2. thunder
  3. other cats
```