width

jQuery: div pops back to full size after animation

点点圈 提交于 2019-12-06 11:58:19
In the jQuery example below, I have one div inside another. When I animate the inner div down to a width of 0, the outer div (which has absolute positioning), decreases in width along with it. This is desired. The trouble is that after the animation is complete, the outer div pops back to its original size. Is this expected? How can I keep this from happening? Thanks! Example html: <div class="outer"><div class="inner">innerContent</div></div> css: div.outer { position: absolute; padding: 10px; background: purple; } div.inner { position: relative; padding-left: 5px; padding-right: 5px;

CSS width wierdness in Chrome and Firefox with Pure CSS

喜你入骨 提交于 2019-12-06 11:41:45
问题 To start off with, I'm quite new to CSS still so I hope I haven't done anything horrendously stupid. Basically, I have a design I'm doing built using Pure and the width is playing up in Google Chrome, while it works as intended in Firefox. Here's a link to what I've done: http://egf.me/Rushd/rushdtest.html and screenshots: Firefox: http://i.imgur.com/mn3GIbT.png Chrome: http://i.imgur.com/44jLC6J.png If you have a look at the page source, I haven't really done anything in my own CSS to change

how can I expand, or make a dojo button wider?

青春壹個敷衍的年華 提交于 2019-12-06 09:16:37
I have this piece of code: <div dojoType="dijit.layout.ContentPane" style="width:200px;margin:0;padding:0;" doLayout="true"> <button dojoType="dijit.form.Button" style="width:100%;" doLayout="true"><span style="width:200px;"> </span></button></div> I think it is clear what I try to do. Do you know how I could make the button take 100% of it's container's width? Thank you. Alright, I got the answer at an IBM's forum, someone told me to override the dijit style: .dijitButtonNode{ width:100%; } and that did the job :-) if you need to change the width for a single instance, changing the CSS class

iPhone 4 web-app browser width: 960 or 981?

空扰寡人 提交于 2019-12-06 08:39:28
问题 <html> <body REMonload="document.location.assign('index2.php?w=' + window.innerWidth + '&h=' + window.innerHeight);"> <script language="javascript"> document.write('w=' + window.innerWidth + '&h=' + window.innerHeight); </script> </body> </html> Output: w=981&h=425 Why? Wikipedia says, w should be 960. Regards, UPDATE I've found out, the problem was related to viewport meta tag. The following code does what I want to see: <html style="width:100%; height:100%;"> <head> <meta name="viewport"

JavaScript+Phonegap+Android: screen.width returns bad (almost random) values

99封情书 提交于 2019-12-06 08:27:36
问题 After launching app with "deviceready" event, my Phonegap app on Android returns false screen.width (window.innerWidth is the same) values on ZTE Blade (native 800px). I get width values like 320, 533 or 787 px, sometimes different values within one app instance (launch) when asking multiple times... I have android:screenOrientation="landscape" in my AndroidManifest.xml. Using Phonegap/Cordova 1.8.1 in Eclipse (Indigo). Some sample values of screen.width: in index.html before document

setting div width according to the screen size of user

允我心安 提交于 2019-12-06 08:13:03
I am trying to set the width and height of a div exactly equal to the size of my users screen. How can it be done. Should I use jquery ? If so, how ? What about some CSS? http://jsfiddle.net/TJGZU/ body, html { /* set size of body to full page and remove margins */ width: 100%; height: 100%; padding: 0; margin: 0; } div { /* set div to full width and height */ width: 100%; height: 100%; } by css seems ideal as pimvdb has suggested...doing it in jquery would be inline styling which would be a bad practice which can be avoided unless necessary. by means of jquery: var windowWidth = $(window)

UIPickerView Width in iOS8 Swift

青春壹個敷衍的年華 提交于 2019-12-06 06:54:49
问题 I simply can not find out how to get a width of a component on my UIPickerView. It's not allowing something simple (Int) as it needs to be CGFloat. What exactly do I put in the <#code#> section? func pickerView(pickerView: UIPickerView, widthForComponent component: Int) -> CGFloat { <#code#> } Thank you! 回答1: That method doesn't "get a width of a component..." The picker view calls that method to ask you how wide a component should be. Your method could be as simple as: func pickerView

How do I set the width and height of my swf in AS3?

我们两清 提交于 2019-12-06 06:45:36
How do I set the width and height of my swf in AS3? This is my code so far: package { import flash.display.Sprite; public class Game extends Sprite { } } Right now, when loaded it is at some arbitrary default size. If I can't change the size this way, is there any easy work around that will be consistent? Try putting [SWF(backgroundColor="#000000", width="200", height="400", frameRate="29")] In the line above public class Game extends Sprite { .... Where you, of course, can set backgroundColor, width, height etc. To whatever you want. Hope it helps! I know you say you want to set the size via

how to fix the column width of a listview in c# windows form?

拈花ヽ惹草 提交于 2019-12-06 06:16:28
i have a listview i need to fix the column width of the listview so that at run time user cannot drag the columnheaders and resize it.....what is the procedure?? i have searched all the properties but none of them help me out to solve this pbm.. this is possible in gridview but how will it be possible in listview.... The easiest way is to use ColumnWidthChanging event: private void listView_ColumnWidthChanging(object sender, ColumnWidthChangingEventArgs e) { e.Cancel = true; e.NewWidth = listView.Columns[e.ColumnIndex].Width; } Use ObjectListView . That not only allows individual columns to be

Importing HTML Table into Excel via clipboard

☆樱花仙子☆ 提交于 2019-12-06 04:39:17
问题 I want to copy tabular data to Excel from my app. The most simple way I found so far was using HTML as the intermediary format. After reading this question, I could preserve the formatting of my data. Is there a way to keep the width of the columns, too? I tried to set the style in various ways: <td style="width:100;">...</td> <td style="width:100px;">...</td> <td style="width:100pt;">...</td> but to no avail. Any ideas? For bonus points, is there a place where I can find a description of