Nura111
asked on
mobile site version by changing css
I Want to create a mobile version of my php website I want to just change the style sheet of the website for the mobile version when I detect a mobile USER AGENT I want to include a different style sheet is there anyway to do it in php?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you all for the help a few question:
A. just to make sure there is nothing to do about the inline style right?
B. does eching the css is basically the same as using the <link rel ?
A. just to make sure there is nothing to do about the inline style right?
B. does eching the css is basically the same as using the <link rel ?
You can put style sheet information into the HTML inline. I like to do this when testing because the browser does not cache the inline style.
ASKER
I mean as for the style information that are inline I cant change it in the mobile version throw the style sheet right?
Nura,
you can do everythings when you detect you visitor are from which agent, mobile or pc browser.
standard page should not contain in-line styles. it's better you put all of them into an css file and then do like steps which i told you in my previous post.
you can do everythings when you detect you visitor are from which agent, mobile or pc browser.
standard page should not contain in-line styles. it's better you put all of them into an css file and then do like steps which i told you in my previous post.
ASKER
what id the media="handheld and media=screen for?
This explains media types
http://www.w3.org/TR/CSS2/media.html
http://www.w3.org/TR/CSS2/media.html
ASKER
Is xsly has anything to do with what im trying to do?
ASKER
XSLT
Can i ask what exactly you need?
XSLT is for transforming XML documents into XHTML documents or to other XML documents.
07fig01.gif
XSLT is for transforming XML documents into XHTML documents or to other XML documents.
07fig01.gif
ASKER
I need to optimize my website to mobile
best way is using specified template for each mobile version like symbian, iphone, blackberry.
read this article -> http://www.smashingmagazine.com/2010/11/03/how-to-build-a-mobile-website/
best way for optimization is optimize your css and images and html contents.
+ decrease size of pictures with php image resizer class
+ use short code instead of normal codes in css. i.e instead of #FFFFFF use #FFF
+ for best and professional appearance you should specify custom template for each mobile version, one of best solutions for this is Smarty Template Engine or another template engines.
+ test your template with adobe live browser
read this article -> http://www.smashingmagazine.com/2010/11/03/how-to-build-a-mobile-website/
best way for optimization is optimize your css and images and html contents.
+ decrease size of pictures with php image resizer class
+ use short code instead of normal codes in css. i.e instead of #FFFFFF use #FFF
+ for best and professional appearance you should specify custom template for each mobile version, one of best solutions for this is Smarty Template Engine or another template engines.
+ test your template with adobe live browser
To anyone who happens across the assisted solution at ID:36973392, note that the href= values should almost certainly be different if you want to have different CSS for the desktop and the mobile device. The correct example of the code is shown in the code snippet at ID:36973444.
ASKER
Oh sorry I chose the wrong one Can I change it somehow?
i think nope, it's not possible for you.
just moderators can change this.
just moderators can change this.
you can get user agent with following code:
Open in new window
here is sample for checking Mozilla browser:
Open in new window
I recommend which you read this article (it's contain mobile user-agents):
http://www.zytrax.com/tech/web/mobile_ids.html
I hope it's be useful.