Jump to content


CSS & Resolutions ?


2 replies to this topic

#1 nygorn

    Young Padawan

  • Members
  • Pip
  • 53 posts
  • Gender:Male
  • Location:Sweden

Posted 23 August 2008 - 08:17 AM

Well, as the description says.
Is it possible so the website detects the resolution on the screen and sets a different style sheet?
I got a background that i've made for my website and got it in different resolutions so when the user has 1680x1050 the 1680x1050 background will show and when the user has 800x600 the 800x600 background will load in the css.
Like TV.com has some times.

#2 rc69

    PHP Master PD

  • P2L Staff
  • PipPipPipPip
  • 3,827 posts
  • Gender:Male
  • Location:Here
  • Interests:Web Development

Posted 23 August 2008 - 12:37 PM

The only way to detect screen resolution is through JavaScript. I don't know how you could use JS to load seperate style sheets, but you could easily use it to change the background image of the body.

:google:

Note: You'll need a fall-back solution for users that don't have JS enabled.

#3 jbladeus

    Young Padawan

  • Members
  • Pip
  • 7 posts

Posted 01 September 2008 - 06:11 AM

Another way to make such layouts is to use percentages instead of absolute values in CSS, that is, where you once used width: 920px, you now use width: 94%.

However, i should point out that using percentages brings with it its own set of complexities eg. using fixed width items in such liquid layouts, such as images etc.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users