lundi 18 juin 2018

Toggle layout stylishly

I need an elegant solution to switch layouts when the client viewport has different sizes. In below you can find the two alternative designs I'm handling. I could implement a solution duplicating the 'name', putting one before and other after the Picture toggling its visibility. Of course that's an awful solution so I'm looking for a more elegant alternative where I don't need to duplicate code. Somebody is aware of a possible solution? or

Mobile view: (small size)

  +----------------------+
  |Name                  |
  +----------------------+
  |Picture   |Text       |
  |          |..         |
  |          |..         |
  |          |..         |
  |          |..         |
  +----------+..         |
  |Text continues here   |
  |                      |
  |                      |
  +----------------------+

Web view: (medium and large size)

  +------------------------------------+
  |Picture   |Name                     |
  |          |+------------------------+
  |          |Text                     |
  |          |..                       |
  |          |..                       |
  +----------+..                       |
  |          |..                       | 
  +------------------------------------+




Aucun commentaire:

Enregistrer un commentaire