Answers.Body: <p>I have never used it, but there is a method <a href="http://buildwithcraft.com/docs/templating/craft.request#isMobileBrowser" rel="nofollow">craft.request.isMobileBrowser()</a>.</p>
  
  <pre><code>{% if not craft.request.isMobileBrowser() %}
      &lt;td&gt;non-mobile browser column&lt;/td&gt;
  {% endif %}
  </code></pre>
  
  <p>or even better, you could give that column a class, and then include a mobile css file to layout the table for mobile:</p>
  
  <pre><code>{% if not craft.request.isMobileBrowser() %}
     {% includeCssFile "/assets/css/mobile.css" %}
  {% endif %}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-12-09T01:22:37.850Z
Answers.Text: Why would I hide the table on a huge Phone that might be perfectly suitable to show it? I'd use media queries instead.
Answers.UserDisplayName: carlcs
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-12-09T06:13:30.950Z
Answers.Text: I just answer questions.... I don't ask why ;)
Answers.UserDisplayName: Douglas McDonald
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-12-09T21:32:41.133Z
Answers.Text: Media queries is probably the best option.
Answers.UserDisplayName: Adam
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-12-08T17:13:04.837Z
Answers.LastActivityDate: 2014-12-08T18:17:53.960Z
Answers.LastEditDate: 2014-12-08T18:17:53.960Z
Answers.UserDisplayName: Douglas McDonald
Body: <p>My custom plugin uses a table to display each of my results, works as intended. However, on the mobile device the table does not layout properly as the table has 6 columns. </p>
  
  <p>I know this is a rather simple task that can be handled with media queries, but is there a way to use the native CSS/tools that craft provides?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-12-09T01:18:37.937Z
Comments.Text: Why hide it? Why don't you aim for a solution that displays it properly in a responsive / scrollable table?
Comments.UserDisplayName: carlcs
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-12-09T02:13:35.567Z
Comments.Text: Tables and responsive don't go together in my opinion. Also the table works fine, until you get past four columns of data on mobile. I'm only looking to hide the last few on mobile so it appears as designed.
Comments.UserDisplayName: Jason McCallister
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-12-09T07:46:16.743Z
Comments.Text: Have a look at ["table-saw"](https://github.com/filamentgroup/tablesaw) or other example code like [here](http://zurb.com/playground/responsive-tables).
Comments.UserDisplayName: carlcs
Tags: <plugin-development><css>
Title: Hiding my plugin table columns for mobile
ThreadText: # Hiding my plugin table columns for mobile
  
  (Asked by: username_0 on 2014-12-06)
  
  My custom plugin uses a table to display each of my results, works as intended. However, on the mobile device the table does not layout properly as the table has 6 columns.
  
  I know this is a rather simple task that can be handled with media queries, but is there a way to use the native CSS/tools that craft provides?
  
  **Tags:** plugin-development, css
  
  > **Comments:**
  > **username_1**: Why hide it? Why don't you aim for a solution that displays it properly in a responsive / scrollable table?  
  > **username_0**: Tables and responsive don't go together in my opinion. Also the table works fine, until you get past four columns of data on mobile. I'm only looking to hide the last few on mobile so it appears as designed.  
  > **username_1**: Have a look at ["table-saw"](https://github.com/filamentgroup/tablesaw) or other example code like [here](http://zurb.com/playground/responsive-tables).  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2014-12-08. Score: 3
  
  I have never used it, but there is a method [craft.request.isMobileBrowser()](http://buildwithcraft.com/docs/templating/craft.request#isMobileBrowser).
  
  ```
  {% if not craft.request.isMobileBrowser() %}
      <td>non-mobile browser column</td>
  {% endif %}
  
  ```
  
  or even better, you could give that column a class, and then include a mobile css file to layout the table for mobile:
  
  ```
  {% if not craft.request.isMobileBrowser() %}
     {% includeCssFile "/assets/css/mobile.css" %}
  {% endif %}
  
  ```
  
  > **Comments:**
  > **username_1**: Why would I hide the table on a huge Phone that might be perfectly suitable to show it? I'd use media queries instead.  
  > **username_2**: I just answer questions.... I don't ask why ;)  
  > **username_3**: Media queries is probably the best option.  
  
  ---
  
  