We help IT Professionals succeed at work.
Get Started

Making table style content work on a PC/Mac and mobile devices HTML CSS etc.

Member_2_1242703
on
216 Views
Last Modified: 2015-03-08
I have a table with 4 <TD> in each row. Looks horrible on mobile devices.

What is the best way to display 4 fields inline when it fits, but have each field be on top of one another when it doesnt?


PC:

Field 1        Field 2           Field 3           Field 4
Field 1        Field 2           Field 3           Field 4
Field 1        Field 2           Field 3           Field 4
Field 1        Field 2           Field 3           Field 4



Mobile:

Field1
Field2
Field3
Field4

Field1
Field2
Field3
Field4

Field1
Field2
Field3
Field4

Field1
Field2
Field3
Field4



I've tried DIVs and SPANs in different combinations with different styles, I just can't get anything to work this way.
What is the standard approach here?
Comment
Watch Question
Fixer of Problems
CERTIFIED EXPERT
Most Valuable Expert 2014
Commented:
This problem has been solved!
Unlock 1 Answer and 4 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE