Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9135041
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T08:46:24+00:00 2026-06-17T08:46:24+00:00

Is it possible using CSS3 media queries to ask: ‘is the height of the

  • 0

Is it possible using CSS3 media queries to ask:

‘is the height of the viewport larger than the width’?

or:

‘is the width of the viewport larger than the height’?

I would like my images to be fluid in both directions!

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T08:46:25+00:00Added an answer on June 17, 2026 at 8:46 am

    For this you might use the following media queries:

    orientation:portrait
    orientation:landscape
    

    I cannot give you more information on the media queries, as I haven’t researched them yet. Do make sure they are supported by the devices you wish to support.

    As for CSS: no, you cannot detect the width and height of your viewport using CSS. CSS is not a programming language, but a styling language. Unless you’re using a CSS preprocessor (Sass, Less), you won’t be able to do anything intelligent with it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: css3 transition animation on load? I would like to animate the progress
Is it possible to get cut out text effect like this using CSS/CSS3 only?
Is it possible to have transparent background image using CSS3? background: url(../img/bg_paperlines.jpg) repeat-x; Using
Is it possible to show only a part of a backgroundimage when using CSS3?
I'm trying to understand the simplest background transition possible using only HTML5 and CSS3
I need to display a custom scrollbar. I would like to avoid using a
if it possible to resize an image, using the CSS3 resize property ? I
It will be possible to obtain animate colour just by using css3? Here is
I'm wondering if is possible to have a responsive layout without using CSS3. Are
More specifically, is it possible to scale a tiled background image using CSS3's transform:scale(x,y)

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.