Screen / Canvas height for Gear S not getting correct - samsung-galaxy-gear

I am trying to port one of my Gear 2 apps to Gear S.
I copied the app with a new name and then changed width/height settings in index.html , config.xml
The width gets correctly fitted (360px)
But the height doesn't fit. It stays like the height is not 480 but 360. There are black marging on bottom anfd top.
How can I start from top 0 ?
ps. I have abackground which is set to 100% fit
.canvas#cnvs {
width:100%;
heigth:100%;
background: url(../images/BG_PART.png);
background-repeat: no-repeat;
background-position: 50% 50%;
display:block;
}

the problem was the following line in my config.xml
<preference name="view-compat" value="square"/>
it is solved when I remove this.

Related

Shiny - how to center and fix width of dashboard

Hello R Studio Community,
I've been developing an app in Shiny and it's be great. I have one simple question.
As different browsers have different widths, is there a way to set the rule on resizing the Shiny dashboard based on the following:
1) If browser width is more than x, limit to width to x and center the entire dashboard
2) If browser width is less than x, follow default autosizing
3) Not essential. But how do I set the blank space color to the left and right of the dashboard
The motivation is that I need a fixed width so that some pictures are scaled correctly. I hope my request can be done through some div tag on the dashboardPage.
This is the current behavior which I do NOT want.
Shiny dashboard stretches to fit window
Cheers,
Donny
Hi to achive what you are asking for just add the following code to the beginning of your dashboardBody. something like this
dashboardBody(
tags$head(
tags$style(
"body{
min-height: 611px;
height: auto;
max-width: 800px;
margin: auto;
}"
)
),
... #the rest of you ui code
hope this helps

How to select iframe by width or height in python 2.7 selenium?

I try to select this iframe:
<iframe width="318" style="border: 0px none; padding: 0px;" height="158"></iframe>
As you can see, it has no name. I know I could do it with:
driver.switch_to_frame(5)
Problem is that the page changes, so this iframe is not always (5) on page, so I need different way how to select it. Is there a way how to select iframe by its width or height?
You can locate it by height attribute as
driver.switch_to_frame(driver.find_element_by_xpath('//iframe[#height="158"]'))
or both by height and width:
driver.switch_to_frame(driver.find_element_by_xpath('//iframe[#height="158" and #width="318"]'))
but you'd better to locate it as a descendant of some ancestor div, e.g.
driver.switch_to_frame(driver.find_element_by_xpath('//div[#id="some_id"]//iframe'))
as it seem to be more reliable way

What is making vertical scrollbars appear on my website?

I am having a problem with my website ( based on Blogger). There are vertical scrollbars appearing eventhough there they are not needed and they don't even move up or down. Can you please help me figure out what is causing them to appear ?!
this is my website url to check it : http://gsalafi.blogspot.com/p/ar.html
and this is my blogger template code : http://pastebin.com/V9j9mu8J
Please tell me if you note any errors in the code.
You have to edit your css, or perhaps replace your <body></body> with <body style="overflow: hidden; width:1024px; margin:0px auto 0px auto;"></body>.
Remember:
overflow-x: hidden;
Would hide any horizontal overflow, and insuring any horizontal scroll bars disappear.
overflow-y: hidden;
Would hide any vertical overflow, and insuring any vertical scroll bars disappear.
overflow: hidden;
Would remove both scroll bars, and all overflow content.

Change the tag-it font size

Does anybody know how to change the size of the fonts appearing in tags of the tag-it plug in? I went over the stylesheet but it does not seam obvious to me how to do it.
It is in the color specifc css file, tagit-stylish-yellow.css for example.
Look for
ul.tagit { cursor: text; font-size: 14px; color: #333; }
and change the font-size.
I found this by going to the demo site in Chrome, start the inspector by pressing F12, selecting the tag and looking at the css directives that affect it.

How do I display a large image when rolling over a thumbnail that allows text to be written over the large image

I have images in a table and want to click on each and have them enlarged on the screen. I can find alot of these snippets online but none I have found allow for writing text over the enlarged images. These pix are artwork and need a copywrite statement on top of them when enlarged. Anyone know either how to do this or where to find it online....thx....David
The only way I can find to add text over an image is to create the image as the background. Setting up a division and table allowed me to only have the background apply to a certain area of the screen.
You can try this code :
<div id="lare_img">
<div class="copyright">Your copy right text here </div><div class="img_file"><img src="img_01.jpg"></div></div>
and style CSS :
<style>
#lare_img{
width:100% // change to your image large width ;
height:100% // change to your image large height;
position:absolute;
}
.copyright{
position:absolute;
bottom:20px;
left:20px;
z-index:999;
}
.img_file{
width:100%;
height:100%;
float:left;
}
</style>