Welcome to Esato.com



News Articles:

CSS and mobile phones

Click to view updated thread with images


Posted by Jim
Hi all, I need a bit of help.

I just discovered that the K700 supports stylesheets so I'm trying to transform my site for mobile phones, handhelds, ... . I use so that any "handhelds" are using the mobile.css but I have a problem in the css: I try to put a width of auto or 100% so that it fits on any screensize but it doesn't work for the text ... .

What am I doing wrong ? Anybody has experience with that ?

Thanks in advance

Edit: well I was wrong, it doesn't support it very well, only 10%

_________________
K700 - T610 themes site

[ This Message was edited by: Jim on 2005-02-01 20:42 ]


Posted by Jim
Found it, was using margins in a div tag so I removed it.

Edit : 90 % of users reported a crash of the mobile phone, so I removed the link to avoid any problems

Many thanks

_________________
K700 - T610 themes site

[ This Message was edited by: Jim on 2005-01-31 17:35 ]

Posted by Jim
Come on somebody can test it, it takes 2 minutes

Posted by knight4led
I tried it out on my P910 and it looks pretty decent. I don't know if this helps since my phone has full HTML support and narrow screen layout. Can't see any major issues.

Posted by wapchimp
Is it supposed to divert you to a wap site or load the full web site on the phone? Cos it took ages to load, but did load fully on my 6600

Posted by Jim
It's just my xhtml pages, no redirect at all, I know that you use redirects based on the webbrowser wapchimp

I have this between the < head> tag

Code:

<link rel="stylesheet" href="stylesheet.css" media="screen" />
<link rel="stylesheet" href="mobile.css" media="handheld" />



So when a "handheld" acces the index page it uses the mobile.css where I define whatever I want in there.

It's long to load because there was the images, I just removed them in the css.

Btw: there are load's of person that are testing ( I can see you in the logs !!! ) the page and no one reply

[ This Message was edited by: Jim on 2005-01-30 21:46 ]

Posted by DSF
Hey Jim, ive tested your page with netfront on my phone (since my phone's default browser suport only wml) with 'native' display option (display the site how it is, without rearranging to other ways). It load but the text width is about 1/3 of screen. I will post a screenshot to see how the page was rendered (tomorrow after exam)

Posted by wapchimp
Good idea to strip out the non essential stuff for wap phones using CSS

Posted by Jim
Thanks DSF, it really helps me because I only have a K700 to test the pages ...

@wapchimp: well it's faster cause you don't have to rewrite all the pages in wml and easier to edit as it would affect all the pages at the same time but as you can see it might take some time before I get a 100% working one

Posted by toneyericsson
Strange. Im using R2L Firmware and have never experienced this handset switch off or crash until i clicked on the themes?

Posted by Jim
Your phone crashed ? Starnge I'm using R2L also and can browse/downlaod whtout a problem

Edit: whow I have problem with the keyboard

_________________
K700 - T610 themes site

[ This Message was edited by: Jim on 2005-01-30 22:40 ]

Posted by toneyericsson
It switched off when i clicked on themes, i went back onto WAP and tryed again and it did the same. ? Weird.

Posted by Jim
Ok I'm sorry I'm using R2A, it's really strange that it switch off cause it's a valid css and a valid xhtml page so I guess it's a bug in the R2L firmware which is a bad news if it happens on all R2L phones

Posted by toneyericsson
It must be a bug, funny thing is i havent experienced it before. Maybe some other K7 users with R2L could try it.

Posted by Jim
Yup waiting for others to reply . Thanks toneyericsson for everything


Posted by toneyericsson
Thats ok:-)

Posted by wapchimp
I remember my original T610 section made the T610 handset reboot. The K700 maybe similar.

It is something to do with the cache. The page is probably to large to load for the browser. So it reboots. Thats why I opened a 'light' version with text only links. The original section had links made with 'gif' images. So the page was fairly high in size

Posted by toneyericsson
That could well be it. Im on o2 aswell if that makes any difference, proberly not though.

Posted by Jim
Yeah the "themes" pages still has the images, maybe that's the problem but how come Laffen can do it without any problem ?

Anyway, to avoid any problems I removed any images so it's pure text now

Posted by toneyericsson
It still switches off on my K7 and a few other K7 and even S7 users got the same problem. Ive just tryed it with my T610 and that is fine. It couldnt be both K7's and S7's firmware that has a bug with it could it. Im lost to say whats wrong heh.

Posted by Jim
So it works on a T610, P900, P910, S700 but it also crash some K700 and S700 phones. I don't know what's happening then, I'm lost here. Even if I ask Sonyericsson they will never reply ...

Posted by toneyericsson
Nope, someone I know tryed it on there S700i and crashed just like all peoples K700i's that tryed it when clicking on any of the options. I got these people from another site (wapoc.com) to try it out you see. Keep at it, it looks a good site:-)

Posted by Mrb 18
Tried my s700 running on r3f and it crached when clicking on the links...

Posted by Jim
Like everybody, strange that my K700 can browse whitout any problem. Anyway, I looked after information on the Sonyericsson Developer site and found out that it will be too difficult cause of differences of browsers and cache between the phones.

The only way is to make apart xhtml pages and recode everything and I also think that the sytem I used is more for handhelds, mobile phones doesn't have enough ressources to display such pages.

Too bad I had great hopes in this, maybe in the future ...

Posted by DSF
Here it's the screenshoot that i've promised to post:



Posted by Jim
Thanks DSF, once mobile phones will have webviewers respecting standards I guess this sytem will work in the meantime it doesn't work very well.

Thanks all for having taken the time to test it


Posted by toneyericsson
It works now:-) S700i users can use it aswell.

Posted by Jim
Yeah it's normal, you are viewing the full page, like on a computer but whitout the stylesheet attached to it so you only see text and in the order on how I coded the page ... not very great to browse on a phone .

In conclusion: mobile phones doesn't support css, well 90% of them ...

Thanks again toneyericsson you where very helpfull, like the others who helped me . Btw I think there should be some kind of "developer" forum, it can be very helpfull sharing what we know and might attract more persons

Posted by wapchimp
I did start a wap forum ages ago

http://www.esato.com/board/viewtopic.php?topic=16024&forum=12

[ This Message was edited by: wapchimp on 2005-02-01 20:54 ]

Posted by toneyericsson
Thats ok mate:-) the themes you made are great, keep at it with the site that will be good too!:-)


Click to view updated thread with images


© Esato.com - From the Esato mobile phone discussion forum