5 Replies - 462 Views - Last Post: 24 July 2010 - 07:23 AM

#1 EnvXOwner  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 357
  • View blog
  • Posts: 2,319
  • Joined: 10-August 09

Media Attribute

Posted 21 July 2010 - 09:00 AM

I'm trying to make my website use different style sheets for different resolutions. I know that I need to use the media attribute, but I don't know how to set it from the minimum to the maximum resolution.

<link rel="stylesheet" type="text/css" href="styles/resolution" media="screen" />


How do I make that work with different resolutions?

Is This A Good Question/Topic? 0
  • +

Replies To: Media Attribute

#2 husseycoding  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 52
  • View blog
  • Posts: 174
  • Joined: 23-June 10

Re: Media Attribute

Posted 21 July 2010 - 11:03 AM

Without having some server side scripting going on to serve different source code I don't think this would be possible. I could also easily imagine this kind of approach quickly getting messy to code and very time consuming to maintain.

A much better approach in my opinion is to build your site to cater for the vast majority of users, you will find a very small percentage of people have horizontal resolutions of any less than 1024, so if you go for a maximum site width of 980px or there abouts for you site you will be catering for all but the absolute minority.
Was This Post Helpful? 0
  • +
  • -

#3 Dormilich  Icon User is offline

  • 痛覚残留
  • member icon

Reputation: 3390
  • View blog
  • Posts: 9,586
  • Joined: 08-June 10

Re: Media Attribute

Posted 21 July 2010 - 10:54 PM

View Posthusseycoding, on 21 July 2010 - 06:03 PM, said:

Without having some server side scripting going on to serve different source code I don't think this would be possible.

afaik, it is possible in CSS3 to add conditions, but not every browser supports that.
Was This Post Helpful? 0
  • +
  • -

#4 EnvXOwner  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 357
  • View blog
  • Posts: 2,319
  • Joined: 10-August 09

Re: Media Attribute

Posted 23 July 2010 - 12:10 PM

Yeah. I know that it's a CSS3 property. I've even seen a tutorial on a website on how to do it. But now I can't find the website.
Was This Post Helpful? 0
  • +
  • -

#5 Dormilich  Icon User is offline

  • 痛覚残留
  • member icon

Reputation: 3390
  • View blog
  • Posts: 9,586
  • Joined: 08-June 10

Re: Media Attribute

Posted 24 July 2010 - 04:10 AM

it is for instance mentioned in this artice.
Was This Post Helpful? 0
  • +
  • -

#6 EnvXOwner  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 357
  • View blog
  • Posts: 2,319
  • Joined: 10-August 09

Re: Media Attribute

Posted 24 July 2010 - 07:23 AM

View PostDormilich, on 24 July 2010 - 05:10 AM, said:

it is for instance mentioned in this artice.

The thing I say was similar to that.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1