Discussion Forums  >  Images, Documents, File Locations

Replies: 13    Views: 365

Adnan Basra
Aspiring developer
Profile
Posts: 189
Reg: Apr 26, 2013
Salmiyah
2,940
06/28/13 01:33 AM (11 years ago)

Html /text page (fit to iphone & Ipad) with css and images

Hi, I want to create pages using html/text plugin. how can i make the images and css work together in ios and android and finally how can i make my html page compatible with iphone and Ipad size? Thanks in advance,
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
06/28/13 02:30 AM (11 years ago)
<head> <title>Here is one way you can do it</title> <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" /> <meta content="width=device-width, initial-scale=1.0" name="viewport" /> <link media="screen and (max-device-width: 320px)" href="iphone.css" type="text/css" rel="stylesheet"> <link media="screen and (max-device-width: 640px)" href="iphone5.css" type="text/css" rel="stylesheet"> <link media="screen and (min-device-width: 767px)" href="ipad.css" type="text/css" rel="stylesheet"> </head> Cheers! -- Smug
 
Adnan Basra
Aspiring developer
Profile
Posts: 189
Reg: Apr 26, 2013
Salmiyah
2,940
like
06/28/13 03:28 AM (11 years ago)
Thanks and how to connect my html page with css and js files?
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
06/28/13 03:59 AM (11 years ago)
Well, the 'above' code is in the 'head' of your html page. Your css documents (one for each device) should be in the same directory as the html page. Java (js) files would also be linked in your head. http://www.tizag.com has lots of tutorials on HTML and CSS that can help guide you. Cheers! -- Smug
 
farcat
buzztouch Evangelist
Profile
Posts: 1008
Reg: Jan 27, 2012
France
13,230
like
06/28/13 05:27 AM (11 years ago)
Tizag.com is the best, that where I learn HTML and CSS. Re your Javascript, don't forget to exclude the .jv from compiling, here is how: http://www.nimblekit.com/forum/viewtopic.php?f=5&t=2805&p=13746&hilit=Copy+Bundle+Resources#p13746 Have fun! Farcat
 
Adnan Basra
Aspiring developer
Profile
Posts: 189
Reg: Apr 26, 2013
Salmiyah
2,940
like
06/28/13 05:41 AM (11 years ago)
I mean should i move my css and js file to Bt_Images?
 
farcat
buzztouch Evangelist
Profile
Posts: 1008
Reg: Jan 27, 2012
France
13,230
like
06/28/13 05:51 AM (11 years ago)
No, they go to BT_doc
 
Adnan Basra
Aspiring developer
Profile
Posts: 189
Reg: Apr 26, 2013
Salmiyah
2,940
like
06/28/13 05:52 AM (11 years ago)
I mean should i move my css and js file to Bt_Images?
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
06/28/13 06:18 AM (11 years ago)
Hi @farcat, I've been wondering if you you worked out how to add your javascript, you'd gone a bit quiet.
 
farcat
buzztouch Evangelist
Profile
Posts: 1008
Reg: Jan 27, 2012
France
13,230
like
06/28/13 06:26 AM (11 years ago)
Hi AlanMac, Man, I am so busy working on so many different things that I have apps coming out of my ears... What thread are you referring to? Got an exciting app in review (been in review for three weeks) and another one about to submit with quite a lot of Javascript on it. Cheers, Farcat
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
06/28/13 06:32 AM (11 years ago)
Oops, sorry @farcat, I muddled you with somebody else who had messaged me and asked how to add JavaScript to their project. I'd pinged them a couple of messages back, but with no reply. Sorry.
 
farcat
buzztouch Evangelist
Profile
Posts: 1008
Reg: Jan 27, 2012
France
13,230
like
06/28/13 06:35 AM (11 years ago)
No worries :)
 
Jake Chasan
Veteran developer
Profile
Posts: 1685
Reg: May 13, 2011
location unknow...
29,650
like
06/28/13 07:34 AM (11 years ago)
Try putting this in the header of your HTML: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <meta content="text/html; charset=utf-8" http-equiv="Content-Type" /> <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" /> <meta content="true" name="HandheldFriendly"/> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ It works well, and you can adjust the scaling and zoom. Edit: This does almost what Smug's does Jake
 
Adnan Basra
Aspiring developer
Profile
Posts: 189
Reg: Apr 26, 2013
Salmiyah
2,940
like
06/28/13 03:58 PM (11 years ago)
Thanks Jake. You made my day.
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.