Go Back   CodingForums.com > :: Client side development > General web building > Building for mobile devices

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 07-07-2010, 01:07 PM   PM User | #1
robert475
New Coder

 
Join Date: Apr 2008
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
robert475 is an unknown quantity at this point
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
robert475 is offline   Reply With Quote
Old 07-07-2010, 03:58 PM   PM User | #2
Apostropartheid
The Apostate


 
Apostropartheid's Avatar
 
Join Date: Oct 2007
Posts: 3,215
Thanks: 16
Thanked 265 Times in 263 Posts
Apostropartheid is on a distinguished road
And what iPhone did you use to test? Also, please provide a link.
__________________
Blog | Twitter
Useful links: W3C HTML Validator | W3C CSS Validator | HTML 5 Guide
CF: HTML & CSS Resources/Tutorials Thread | HTML & CSS Posting Rules and Guidelines
Remember: no link, no code, no help!
Apostropartheid is offline   Reply With Quote
Old 07-07-2010, 04:45 PM   PM User | #3
robert475
New Coder

 
Join Date: Apr 2008
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
robert475 is an unknown quantity at this point
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
robert475 is offline   Reply With Quote
Old 07-08-2010, 03:24 PM   PM User | #4
Apostropartheid
The Apostate


 
Apostropartheid's Avatar
 
Join Date: Oct 2007
Posts: 3,215
Thanks: 16
Thanked 265 Times in 263 Posts
Apostropartheid is on a distinguished road
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.
__________________
Blog | Twitter
Useful links: W3C HTML Validator | W3C CSS Validator | HTML 5 Guide
CF: HTML & CSS Resources/Tutorials Thread | HTML & CSS Posting Rules and Guidelines
Remember: no link, no code, no help!
Apostropartheid is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:04 AM.


Advertisement
Log in to turn off these ads.