0

I am trying to update my site to responsive. I have several includes in php on a page. Using media queries sizes I want to hide one of them when it is phone size. Is it possible to hide this with css?

<?php include('slideshow.html'); ?> 

Thanks for any suggestions!

Bodine
  • 39
  • 1
  • 9

1 Answers1

0

You can place a div before php file include , and hide it on mobile resolution . Like following example .

<div class="slide_show">
<?php include('slideshow.html'); ?> 
</div>

css

<style type="text/css">
@media only screen and (min-device-width : 320px) and (max-device-width : 480px) {
.slide_show {
   display:none;
}
}

Gaurav
  • 442
  • 3
  • 7
  • I tried that, added important, then visibility important. No success. then I went into the file and wrapped the code with the div and still no success. – Bodine Jun 15 '16 at 20:10
  • Then in css @media only screen and (min-device-width : 320px) and (max-device-width : 480px) { .slide_show { display:none !important; visibility:hidden !important; } } – Bodine Jun 16 '16 at 16:18
  • add – Gaurav Jun 16 '16 at 16:22
  • Sorry I didn't make that clear the style is in a css and then I have this on top of the main file with the include – Bodine Jun 16 '16 at 16:42
  • I check your . there is nothing wrong in this file . u can check your file is include or not . by check view page source code on browser and search your file link in source code . – Gaurav Jun 16 '16 at 16:56