Forums

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

Home Forums JavaScript js condition for different picture depending on size of screen.

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #36863
    shamai
    Member

    i realized that my website looks a bit empty on big screens.
    this gives me a chance to show a bigger picture on the home page.
    how can I make a javascript condition where if the screen is bigger it should use the bigger picture and if its smaller use the default picture
    thanks!

    #97539
    Schot
    Member

    Heya shamai. media query should be able to help you with that. :)

    https://css-tricks.com/search-results/?q=media%20query

    #97542
    shamai
    Member

    thanks!
    yeah that looks good except i just plan on adding a @media into my css file with the condition.
    the problem of course is ie7 and 8… maybe I should just let them see the regular screen…

    i mean… how many computers out there have big screens running i.e. 7? i figure usually people with nice big screens tend to have nice new computers with ie 9

    also I noticed that small screens like iPads make my website tiny and the browser resizes it on there own… is it good to make a whole separate stylesheet for these people?

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