Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Apr 2008
    Posts
    34
    Thanks
    0
    Thanked 0 Times in 0 Posts

    css for mobile/smart phones

    Hi

    I would like to optimise my site for blackberrys, iphone etc. I have read a little up on using the relevant style sheet using this approach:

    Code:
    <link href="css/styles.css" rel="stylesheet" type="text/css" media="screen" />
    <link media="only screen and (max-device-width: 480px) and (min-device-width: 320px)" href="css/mobile.css" type="text/css" rel="stylesheet" />
    Sadly when i tested it on the iphone and blackberry nothing is changed. Does anyone have any experience or tutorials on how to tackle this type of scenarios?

    I have used the following link as a reference but like i said i have run into a brick wall!

    site

  • #2
    The Apostate Apostropartheid's Avatar
    Join Date
    Oct 2007
    Posts
    3,215
    Thanks
    16
    Thanked 265 Times in 263 Posts
    And what iPhone did you use to test? Also, please provide a link.

  • #3
    New Coder
    Join Date
    Apr 2008
    Posts
    34
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I have tested it on the iphone 3gs, also on a the blackberry bold.

    The link is here.

    At the moment the style sheet for mobile.css is empty as i am testing it but whether its on the smart phone or pc it is using the default style sheet (styles.css).

    Thanks

  • #4
    The Apostate Apostropartheid's Avatar
    Join Date
    Oct 2007
    Posts
    3,215
    Thanks
    16
    Thanked 265 Times in 263 Posts
    I get a 404 on that.

    Mobile devices will add the contents of the mobile stylesheet onto the normal one. You will have to actually change something to see an effect.


  •  

    Posting Permissions

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