Hi Bona,
As, usual, this may be of use to everyone in class, so I'll cc the google group.
Yes, we'll go over some of the DOM stuff and talk about how you might modify the tabs example. Bring your questions.
The way to deal with images to work across multiple different screen resolutions is to set your image size using css and javascript. For example you can use the following css:
.myImageClass
{
height: 20%; /* 20% of the height of the containing element */
}
It can be a little tricky to support both landscape and portrait and is something you should play around with.
or you can use the direct accelerometer data as we'll cover in class today.
Sometimes it's helpful to use javascript to get the height and width of the current "browser" window.
var w = document.documentElement.clientWidth; // width of the current browser window
and then set the size of your image using DOM accessors
var myImage= document.getElementById("myImage");
myImage.style.width= w + "px";
**NOTE** this is live coded in my gmail window, so I can't guarantee that any of this will work, but this might get you heading in the right direction.
Bring any questions to class.
Cheerio,
Sean
On Thu, Feb 16, 2012 at 10:47 AM, Bona kim
<bk1...@nyu.edu> wrote:
Hi Sean,
I've been trying to make the tabs according to the tutorial you've posted on the email but having hard time integrated it on my format.
Could you explain more about this in class? I think it will be beneficial to other students as well.
Also, what is the resolution I should work? I made png files to use as buttons and they appear a lot larger on the emulator. Is there a preferred resolution of window size I should reference?
Thank you so much!
Bona