Adaptive Forms for Desktop and Mobile

Discussion in 'HTML & Website Design' started by slehmann36, May 17, 2015.

  1. #1
    I am creating a personal website and I want a contact form on it. the contact form is there and works but I haven't styled it yet. This is is the basic layout I would like for the desktop site but that is not at all mobile friendly. at the moment I have viewports pointing to a 'desktop' and 'mobile' stylesheet which has worked perfectly until now.

    An obvious solution for aligning elements in the form is to use a table, but a different layout is required if viewed on a mobile device.

    I have looked at pure css form styling which in theory sounds great but it looks pretty complicated.

    How could I go about alligning form elements differently depending on viewing media?

    Any help is much appreciated.
     
    slehmann36, May 17, 2015 IP
  2. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #2
    We really can't say without seeing your form markup, if you are ACTUALLY marking up your forms PROPERLY (with fieldsets, labels, for attributes, etc), and how you want to format it across different browsers.

    The CSS for doing it isn't THAT complicated if you actually understand how to use HTML and CSS properly... if you are having trouble with it, it's entirely likely that "properly" part isn't in the mix; more so if you are even THINKING tables.

    Can we see where you are at with it so far?
     
    deathshadow, May 18, 2015 IP
  3. COBOLdinosaur

    COBOLdinosaur Active Member

    Messages:
    515
    Likes Received:
    123
    Best Answers:
    11
    Trophy Points:
    95
    #3
    I had to check the calendar because I thought maybe I had time shifted back to the 20th century. If you could even consider that for a microsecond, I can't imagine how bad your code is. Please post your code so DS can get his juices flowing.
     
    COBOLdinosaur, May 18, 2015 IP