Reply LinkBack Thread Tools Search this Thread
Old 26-06-2006, 06:08   #1 (permalink)
mudz
Senior Member
 
Join Date: Aug 2005
Posts: 135
I've redesigned my site with CSS, now on the next step.

Hi all,

I have done my homework, read a lot, and switched from table-based to css-based design (clap clap). I still have to tweak a couple of minor things but I think I got the point, finally. Now I would like to progress on to have multiple versions of the site served to different media, such as having a css for print, one for mobiles, and a standard one.
How do I detect such media, e.g. when I connect to mezzoblue.com with my nokia 9500 phone I am served a plain text version of it, not the regular one. Same question goes for defining a print-specific style for my content.
I hope I will find the same great and willing support here for this new little journey I am embarking on. Meanwhile, I'll keep reading. Never take anything for granted, always do your homework
Cheers
  Reply With Quote
Old 26-06-2006, 06:36   #2 (permalink)
funkyprem
For all your goober needs
 
funkyprem's Avatar
 
Join Date: Dec 2004
Location: Coventry, UK
Posts: 1,531
direct from mezzoblue:

<link rel="stylesheet" type="text/css" href="/css/7mar06-a/wintermint.css" media="screen, projection" />
<link rel="stylesheet" type="text/css" href="/css/7mar06-a/mobile.css" media="handheld" />
<link rel="stylesheet" type="text/css" href="/css/wintermint-print.css" media="print" />
  Reply With Quote
Old 26-06-2006, 06:36   #3 (permalink)
Limbo
Baskin'
 
Join Date: Feb 2005
Posts: 5,621
use the @import attribute within a stylesheet or define media type print of screen withing the link in your header

<link href="css/global.css" rel="stylesheet" type="text/css" title="global">
<link href="css/print.css" rel="stylesheet" type="text/css" media="print">

this will then print your styles in this CSS and ignore your global one

Search for css @import for more details on this.

Or what the cosby said ^^
  Reply With Quote
Old 26-06-2006, 06:44   #4 (permalink)
mudz
Senior Member
 
Join Date: Aug 2005
Posts: 135
Thank you guys. How does the detection work anyway? For instance, and still using my N9500 as an example, does the bundled opera browser send "information" when browsing that state that the device it's working on is actually a handheld, so that websites with media-specific stylesheets will automatically serve it the right styles? Is it something 100% reliable?
Maybe this was more the question, actually. Thanks for helping
  Reply With Quote
Old 26-06-2006, 09:14   #5 (permalink)
pgo
Senior Member
 
Join Date: Jan 2005
Posts: 12,340
Yes and no, it's not 100% reliable - user agents can spoof it and support for different media is...shitty...outside of screen (for good old browsers).
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8