Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 07-19-2012, 11:27 PM   PM User | #1
nick2price
Regular Coder

 
Join Date: May 2009
Posts: 105
Thanks: 47
Thanked 1 Time in 1 Post
nick2price is an unknown quantity at this point
html tables

Hey, I have a general question which I am trying to find the answer too. On my site, I have a 2 column table which is used to display data. My site is responsive, and when viewed on a mobile, I want the 2 column table to become a single column table. Is this possible?

Cheers

Nick
nick2price is offline   Reply With Quote
Old 07-19-2012, 11:33 PM   PM User | #2
Will Bontrager
Regular Coder

 
Join Date: Jun 2012
Location: Near Chicago, USA
Posts: 123
Thanks: 7
Thanked 19 Times in 19 Posts
Will Bontrager is an unknown quantity at this point
Quote:
Originally Posted by nick2price View Post
Hey, I have a general question which I am trying to find the answer too. On my site, I have a 2 column table which is used to display data. My site is responsive, and when viewed on a mobile, I want the 2 column table to become a single column table. Is this possible?

Cheers

Nick
It may be possible with PHP or perhaps even with JavaScript. The </tr><tr> that creates the second column can be omitted when the page is viewed with a mobile device.

Will
__________________
Numerology API for apps - Facebook, iPad, mobile phones. No charge to use API. [info]

Last edited by Will Bontrager; 07-19-2012 at 11:33 PM.. Reason: codes didn't print correctly
Will Bontrager is offline   Reply With Quote
Old 07-20-2012, 10:35 PM   PM User | #3
Sammy12
Registered User

 
Join Date: Jun 2011
Posts: 1,063
Thanks: 12
Thanked 241 Times in 240 Posts
Sammy12 is on a distinguished road
http://www.codingforums.com/showthread.php?t=268403

If a website is a mobile device, then load a stylesheet in which hides the second column. Quite simply, a stylesheet (which I would name "mobile.css"), would have:

Code:
.column2 {
    display: none;
}
Sammy12 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 11:09 PM.


Advertisement
Log in to turn off these ads.