width

UINavigationItem title label set width?

别说谁变了你拦得住时间么 提交于 2019-12-25 01:46:09
问题 In my UIViewController i set my title dynamically so i do not know the length of the string that will be shown in the navigation bar and because of that i have the current situation: alt text http://img94.imageshack.us/img94/2484/picture3vf.png is there any way to set the width of the label that displays the title in the navigation bar? or should i think of a with, compare the text length to it and if it is too long should i resize it and display the famous "..." ? I know that i can add an

Setting width of multiple elements with same class depending on their number

心已入冬 提交于 2019-12-24 20:48:39
问题 I'm experiencing a problem similar with one I had before. I'm trying to give multiple elements a width depending on how many of them exist. Say I have 5 elements, their widths have to be 20%, if I have 4 25% etc. (width = 100 / n) I thought this would work, but it doesn't: if ($(window).width() <= 960) { $("aside.widget").css("width", function(){ var widgetLength = $("section#secondary").children("aside.widget").length(); return 100 / widgetLength + "%" }); } Nor does: if ($(window).width() <

Resizing an image using Javascript running in Opera Browser

无人久伴 提交于 2019-12-24 20:27:29
问题 I hope someone can help with this quirky issue I am having with the Opera Browser, I have version 11 Beta installed, but I suspect is a common problem in Opera. The website and page in question is http://www.amigaos.net/index.html. At the bottom of the body of the html I have the following code which resizes the 3 images you see on this webpage depending on width of the viewport at page load. In Safari and FireFox the code works fine, but in Opera the following lines which involve resizing

Unable to force website to fit to screen width

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-24 20:22:57
问题 I can't make my website fit to the screen. I don't know what is resisting my max-width 100% rules across all the higher level divs. I don't really use fixed widths for the most part; only percentage widths below and up to 100%. The website begins to resist horizontal reduction at about 773 pixels horizontally. Just for clarity, there is a media query-facilitated a break point which shifts the sidebar below the main content at 600px screen width, and another break point at 1024px wide+, in

ggplot::geom_boxplot() How to change the width of one box group in R

自古美人都是妖i 提交于 2019-12-24 19:49:02
问题 I want to adapt the width of the box in the category "random" to the same width of the other boxes in the plot. It is now a single group, whereas the other groups contain two subgroups... Any ideas on how to do that? Using geom_boxplot(width=0.2) just changes the width of all boxes. So far I used the following code: ggplot(TablePerCatchmentAndYear,aes(x=NoiseType, y= POA, fill = TempRes)) + geom_boxplot(lwd=0.05) + ylim(c(-1.25, 1)) + theme(legend.position='bottom') + ggtitle('title')+ scale

Gradient full scale background CSS

余生颓废 提交于 2019-12-24 19:24:09
问题 Full page CSS3 Gradient Backgrounds: Alright so I am trying to make my background be a gradient that is always 100% width and height, and it works, except for the fact that nothing will show up on top of it. Here is the code I currently have. CSS: <style type="text/css" media="screen"> #bodyBg{ background:rgb(79,143,249) no-repeat center center fixed; /* Old browsers */ background: -moz-radial-gradient(center, ellipse cover, rgba(164,197,252,1) 1%, rgba(79,143,249,1) 100%); /* FF3.6+ */

RoR - Paperclip - How to set minimal width of an attachement

血红的双手。 提交于 2019-12-24 18:33:43
问题 my layout's requirement is to keep all thumbnails at 80px height, not higher, not smaller. In my model I set the style to :thumb=> "500x80>" , so basically almost every picture which is not too wide gets its perfect miniature with 80px height. Sometimes, however, my pictures are narrow and high, so the thumb can have unclickable dimensions of like 5x80. So I dont want to crop pictures as long as thumbnails are not getting crazy narrow, but I think I can make a little sacrifice and crop them

CSS position relative without relative width?

微笑、不失礼 提交于 2019-12-24 17:23:33
问题 I'd like an element to have relative positioning. But I don't want its child element (with position:absolute ) to have relative width to the parent. For example: http://jsfiddle.net/t2yJP/. I'd like the second body>div to have position:relative , but have its child's width maintain the same behavior. 回答1: How about this jsFiddle. But you should really rethink your strategy. In your fiddle, your second example only works because the parent div is not positioned and therefore, the .abs div is

Fit image to table cell width percentage (HTML)

只愿长相守 提交于 2019-12-24 17:07:22
问题 I organized my website content in a HTML table, and I've set specific widths for every cell (in percentages). Now I have a rather large image in a combined cell that is supposed to span 30% of the whole table, or 2 cells (of 15% each) from a different row (using colspan="2"). The image, however, is wider than 30% of my small computer screen, and that seems to dominate over my set cell width, i.e. it stretches my cell to the width of my image rather than the other way around, which throws off

set extended ImageView width and height programatically - android

只谈情不闲聊 提交于 2019-12-24 16:26:03
问题 I have a custom class that extends ImageView that I'm programatically putting on to a RelativeLayout. I want each one of these images to be a specific width and height. I've tried setting the width/height in code with LayoutParams and with setMaxWidth/setMaxHeight...neither seem to be working. Here is the code from the constructor of the class: LayoutParams p = new LayoutParams(50,67); this.setLayoutParams(p); this.setImageResource(WhichImage(wi)); this.setMaxWidth(50); this.setMaxHeight(67);