0

I have a wordpress site and everything looks the way it should on a regular browser. But now if i go to it in mobile it it there are certain sections that don't look right. Is there a way to modify the css when mobile or tablet connect or how do i fix the mobile version of it?

1

1 Answer 1

0

You need use the wp_is_mobile()

For example changing your style.css in the header.php

<?php
if ( wp_is_mobile() ) {
    /* Display and echo mobile specific stuff here */
}
?>
2
  • Just note, wp_is_mobile() might be "useful", it is unreliable and should not be trusted. You are better off using media queries Commented May 11, 2015 at 5:04
  • yes but wordpress is versatile, you can change all css screen only with media query but combining the two ways your site is under your control.
    – Blackhero
    Commented May 12, 2015 at 12:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.