html - Creating stylesheet with either 2 columns or 4 columns for iPhone or iPad -


I am creating a web page to access both the iPhone and the iPad. In the iPhone I have to show a 2 column web page. I want to use the 4 column web page on the iPad. IPhone layout will be

  & lt; Label width = 30% & gt; Name & lt; / Label & gt; & Lt; Input width = 70% value = "John Smith" & gt; & Lt; / Input & gt; & Lt; Div & gt; & Lt; Label width = 30% & gt; Phone & lt; / Label & gt; & Lt; Input width = 70% value = "888-555-5555" & gt; & Lt; / Input & gt;   

But on the iPad, I want it to be on a line

  & lt; Label width = 20% & gt; Name & lt; / Label & gt; & Lt; Input width = 30% value = "John Smith" & gt; & Lt; / Input & gt; & Lt; Label width = 20% & gt; Phone & lt; / Labels & gt; & Lt; Input width = 30% value = "888-555-5555" & gt; & Lt; / Input & gt;   

If you can please give me a simple example of CSS file which will get it using the deviant tags.

I recommend that you read it:

< P> It is not as easy as adding some CSS rules, you need to understand what you really are

This is also very good:

Targeting is one of the best when talking about the link above responsive web design.

Comments