Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Is it possible to show content based on width of page/screen?

I would like to show part of the header and footer only when the paged is shown in full width and then have it go away when used on smaller screen/mobile/pad.

The best thing would be able to use a responsive theme and have areas above and below that only shows when using "full screen" = 1000px.


[FIXED AREA SHOWN ONLY WHEN WIDTH IS 1000+ PX]

Responsive theme

[FIXED AREA SHOWN ONLY WHEN WIDTH IS 1000+ PX]


Best regards, Mikael

share|improve this question
    
Have you read this answer? –  toscho Mar 15 '13 at 9:03
add comment

1 Answer

As you said making a part responsive would be the best way you can choose. Working with screen width is some thing client side, and that's done by CSS or alternatively by Javascript.

If it's related to css, media queries will do the job: http://www.ibm.com/developerworks/library/wa-cssqueries/index.html

and if it's js, width property of screen object does the trick: http://www.w3schools.com/jsref/prop_screen_width.asp

share|improve this answer
    
Thank you! I will take a look. I have also updated my question above with more information. –  Mikael Mar 15 '13 at 13:29
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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