The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other Using media query in a different way.

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #172267

    I have a website where the home page shows four images.

    When the user clicks on any one of these images I want to open a new webpage which displays a larger version of this same image. This is very easy to do as long as you are designing for only a single screen resolution.

    My question is; is there a way where I can use media query to select to open one of three different pages when the images is clicked on, based on the screen resolution of the monitor?

    The reason I want to do this is I need three different sized images on three different pages, one for each of the different screen resolution.

    If there is a better way of doing this without using media query, I would like to hear about that too.

    An alternate way of doing this, if it would work, is to use a media query to select which of three different images to load. I just don’t know if you can use a media query to do things like this.


    OK, I figured out a different way to solve my problem. I loaded the image into the correct <div>
    through the use of background-image:.

    This way my different style sheets for the different resolutions will load different images into the same <div>.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Other’ is closed to new topics and replies.