Home Ask Login Register

Developers Planet

Your answer is one click away!

user2488809 February 2016

Wordpress responsiveness and content for mobile

I am trying to set up my own wordpress website and have a couple of questions.

At the moment I show a background video on the homepage. I am wondering if it is possible to replace this video with an image slideshow on the mobile view?

Also, how can I generally show different content on desktop/mobile view?

Thanks in advance!


And February 2016

This can be achieved by using Media queries.

So for example you could say:

@media (max-width: 800px) {
    #video-div {display:none;}
    #Slideshow-div  {display:block;}

The code above means the video will not display unless the width of the browser window is equal to or more than 800px.

@media (min-width: 800px) {
    #Slideshow-div {display:none;}
    #video-div {display:block;}

This code is saying that as long as the screen is more than 800px wide, the slideshow will not appear.

You can play around with the px amount and have many different media queries.

Post Status

Asked in February 2016
Viewed 1,710 times
Voted 13
Answered 1 times


Leave an answer

Quote of the day: live life