Title: Mobile version website
Last modified: August 31, 2016

---

# Mobile version website

 *  [17Mark](https://wordpress.org/support/users/17mark/)
 * (@17mark)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/mobile-version-website/)
 * Hello, I need create button to my web where after click will change version of
   the web when is customer on desktop from webpage.com to m.webpage.com and when
   is on mobile phone from m.webpage.com to webpage.com. I have two css files – 
   mobile.css and style.css. How can do this or how can I create something like 
   this? I would like to create one css file with responsive styles and when customer
   click to button this will be switch to other device. But I don’t know how. Thanks

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Moderator [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * (@sterndata)
 * Volunteer Forum Moderator
 * [10 years, 1 month ago](https://wordpress.org/support/topic/mobile-version-website/#post-7242619)
 * Mark:
 * Rather than have two css files and rely on the user to select the right one, 
   build something responsive.
 * Google “@media CSS” to learn how to qualify your CSS styles by device width (
   and possibly other characteristics).
 *  Thread Starter [17Mark](https://wordpress.org/support/users/17mark/)
 * (@17mark)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/mobile-version-website/#post-7242641)
 * Yes I know media queries but I need button on the webpage. If it had done so 
   in my opinion I would use it simply media queries but I must add this button 
   and I don’t know how could I launch required part of code.
 *  Moderator [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * (@sterndata)
 * Volunteer Forum Moderator
 * [10 years, 1 month ago](https://wordpress.org/support/topic/mobile-version-website/#post-7242644)
 * here’s one option:
 * make your style.css file just a stub and have two other CSS files, desktop.css
   and mobile.css. In your functions.php, look at whether your site is m.site.com
   or just site.com and then enqueue the appropriate CSS file. Your button would
   simply reload the current page on either m.site.com (if you’re on the desktop)
   or site.com (if on the mobile). You’d use PHP similar to what you’d use in functions.
   php to figure out which you should use.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Mobile version website’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 2 participants
 * Last reply from: [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * Last activity: [10 years, 1 month ago](https://wordpress.org/support/topic/mobile-version-website/#post-7242644)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
