Jump to content

page formatting for small screens


babita

Recommended Posts

Hi all I am trying to write a program to display the web contents fit to the screen size of mobile r PPC wen used for browsing. I have put all the html body in one table of my mobile screen size, and I have inserted <br> at every coloumn seperating place and removed all coloumns. Its working fine for some pages which comtains mastly text in the web page.For some pages the format defined previously is not changing according to my programme.can any one help me in this?THNX FOR THE HELPBabita.P

Link to comment
Share on other sites

seeing your code would help. Most mobile devices still only read XML or WML. So, without seeing anything else, you might need to make sure your page validates to XHTML 1.0 - so <br> would need to be <br /> for one.But seeing your code and know what mobile phone devices you are targeting would help.

Link to comment
Share on other sites

Thnx for the interest. before testing the programme in mobile i m trying to test it on desktop.Its working fine for html... Now i have one small problem. there are lines in the web page horizontally. after the whole part is reformatted these lines r not getting resized.. so the problem. i dont know weather these r any images.. not getting exactly.. here i wanted to attach the output webpage so tht u ll get some idea.... but no attachment facility here.can u tell me whats those leniar lines r?? n how to resze them?

Link to comment
Share on other sites

I can't help much without seeing your code. But I can say that you might want to look for a phone emulator. A web browser uses a different protocol than the older phones. And the newer ones typically have no more than 320x320 viewing area. So, I'd suggest finding a mobil phone emulator to test you pages.

Link to comment
Share on other sites

HI I am using one normal c code for removing all tables and display the rest in a single row.Here is the code I am using.it may luk very basic codingwhile(end of buffer){ ch = inbuf[j++]; if(ch=='<') { outbuf = ch; if(((ch=inbuf[j++]) =='t')) { if(((tempch=inbuf[j++])=='d')) while((ch = inbuf[j++])!='>'); else { i++; outbuf[i++] = ch; outbuf[i++] = tempch; flag = 1; } } else if(ch=='/') { if(((tempch=inbuf[j++])=='t')) { if((tempch2=inbuf[j++])=='d') { ch=inbuf[j++]; outbuf[i++]= '<'; outbuf[i++]= 'b'; outbuf[i++]= 'r'; outbuf[i++]= '>'; } else if(tempch2=='i') { k=0; outbuf[i++]='<'; outbuf[i++]=ch; word[k++] = tempch; outbuf[i++]=tempch; word[k++] = te mpch2; outbuf[i++]=tempch2; //outbuf[i++]=tempch; for(;k<6;k++) { word[k] = inbuf[j++]; outbuf[i++] = word[k]; } word[k] ='\0'; if((strcmp(word,"title>"))==0) { outbuf='\0'; strcat(outbuf,tbstr); i=i+strlen(tbstr); } } else { i++; outbuf[i++]=ch; outbuf[i++]=tempch; outbuf[i++]=tempch2; } } else { i++; outbuf[i++]=ch; outbuf[i++]=tempch; } } else { i++; outbuf[i++]=ch; } } else outbuf[i++]=ch; } outbuf='\0';i didnt use any resizing for images as of now.. ... but m getting the outut with all the lines in it. frm one end to another.. horizontally. confused what to be done?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...