Advanced Search

Results 1 to 2 of 2

Thread: Mobile website using CSS

  1. #1
    Join Date
    Feb 2010
    Posts
    66
    Thanks
    16
    Thanked 0 Times in 0 Posts

    Question Mobile website using CSS

    Hi Guys,

    Just wondering if anyone knows about mobile versions of a website?

    How do you get the page to recognise it's being viewed on a mobile and to pull out a CSS style sheet instead of the usual one it uses?

    Thanks!

    Mark

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,694
    Thanks
    43
    Thanked 3,132 Times in 3,096 Posts
    Blog Entries
    12

    Default

    For the full explanation of all that's allowed, see:

    http://www.w3.org/TR/CSS2/media.html

    Basically (though there are other ways) you specify the media in the stylesheet link, example:

    Code:
    <link rel="stylesheet" href="mobile.css" media="handheld" type="text/css">
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •