Search Results

Search found 8232 results on 330 pages for 'position'.

Page 12/330 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • Drag/drop problem (draggable in position:relative parent)

    - by MackDaddy
    Here's the scenario, I'm using prototype and scriptaculous, but I believe jquery would have the same issue. I have a list draggable images in a relatively positioned div. The problem is I can't drag the images out of the parent div... well... you can, they're just not visible. If you remove the position:relative on the parent div, it works just fine, I can drag items out of the div perfectly. However because of this little IE7 bug: http://snook.ca/archives/html%5Fand%5Fcss/position%5Frelative%5Foverflow%5Fie/ that position:relative is required. IS there another work around to this bug that does not require setting position? I've tried playing with z-index and everything I can think of to no avail. Here's the CSS for the box: #products{ width: 680px; height: 400px; border: 1px solid gray; /*background-color: #66FF00;*/ overflow-y: scroll; overflow-x: hidden; font-family:"Helvetica Neue","Helvetica"; font-size:12px; font-weight:bold; position: relative; } If you would like to see this bug in action, you can visit it here: http://twinmed-dev.com/template%5Fadd.php. Try searching for an item like "gloves" then adding it to the cart below. Thanks for any help.

    Read the article

  • Android How to get position of selected item from gridview without using onclicklistner, using ontouchlistner instead

    - by zonemikel
    I have a gridview, I need to do stuff on motioneven.action_down and do something for motioneven.action_up ... using onclicklistener is great but does not give me this needed functionality. Is there anyway to easily call the gridview and get its selected item in a ontouchlistener ? I've been having limited success with making my own implementation. Its hard to get the right x,y because if i call the child it gives me the x and y relative to the child so a button would be 0,0 to 48,48 but it does not tell you the actual location on the screen relative to the gridview or the screen itself. this is what i've been doing, its partially working so far. Grid.setOnTouchListener(new OnTouchListener() { public boolean onTouch(View v, MotionEvent event) { if (event.getAction() == MotionEvent.ACTION_DOWN) { int x = (int)event.getX(); int y = (int)event.getY(); int position = 0; int childCount = Grid.getChildCount(); Message msg = new Message(); Rect ButtonRect = new Rect(); Grid.getChildAt(0).getDrawingRect(ButtonRect); int InitialLeft = ButtonRect.left + 10; ButtonRect.offsetTo(InitialLeft, ButtonRect.top); // while(position < childCount){ if(ButtonRect.contains(x,y)){break;} if(ButtonRect.right + ButtonRect.width() > Grid.getWidth()) { ButtonRect.offsetTo(InitialLeft, ButtonRect.bottom);} position++; ButtonRect.offsetTo(ButtonRect.right, ButtonRect.top); } msg.what = position; msg.arg1 = ButtonRect.bottom; msg.arg2 = y; cHandler.sendMessage(msg); }// end if action up if (event.getAction() == MotionEvent.ACTION_UP) { } return false; } });

    Read the article

  • tracking the position of dragview

    - by user262325
    Hello everyone I put a dragview on an UIView, I hope when I drag the dragview, its superview (UIView) tracks the position of the dragview and moves itself to the position where to keep dragview at the original position on the UIView. The codes show below: #import <UIKit/UIKit.h> @interface DragView : UIImageView { CGPoint startLocation; } @end #import "DragView.h" @implementation DragView - (id)initWithFrame:(CGRect)frame { if (self = [super initWithFrame:frame]) { // Initialization code } return self; } - (void)drawRect:(CGRect)rect { // Drawing code } -(void) touchesBegan:(NSSet *)touches withEvent:(UIEvent*)event { CGPoint pt=[[touches anyObject] locationInView:self]; startLocation=pt; [[self superview] bringSubviewToFront:self]; } -(void) touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { CGPoint pt=[[touches anyObject] locationInView:self]; CGRect frame=[self frame]; frame.origin.x+=pt.x-startLocation.x; frame.origin.y+=pt.y-startLocation.y; CGRect frame1=[[self superview] frame];//superview of the dragview frame1.origin.x+=frame.origin.x; //tracks the postion of dragview frame1.origin.y+=frame.origin.y; [[self superview] setFrame: frame1 ]; //move to new position [self setFrame:frame]; } my problem is that the UIView moved but lagged to the movement of the drageview(RED BLOCK). Welcome any comment Thanks interdev

    Read the article

  • problem calculating the position using php

    - by LiveEn
    I have a function below which gets name from a site. Below is the partial code, not complete. The values are passed thru a for loop using php. function funct($$name,$page) { $url="http://testserver.com/client?list=$name&page=$page"; $ch=curl_init(); curl_setopt($ch,CURLOPT_URL,url); $result=curl_exec($ch); $dom = new DOMDocument(); @$dom->loadHTML($result); $xpath=new DOMXPath($dom); $elements = $xpath->evaluate("//div"); foreach ($elements as $element) { $name = $element->getElementsByTagName("name")->item(0)->nodeValue; $position=$position +1; echo $name.$position; } } The code works fine but when i get a name i need to add a position and for each name it will be incremented by 1 to make it contentious. But when the values for the pages are passed, for an example when i move from page 1 to page 2. the count starts again from first, next page... same problem. How can i make it continues on every page?

    Read the article

  • Dropdown menu not showing when using position: absolute;

    - by Xiy
    I've just turned my website into a responsive layout and along the way I've somehow managed to make my dropdown menus not work. When hovering over 'Drop-downs' they don't display unless I'm using position: relative. They worked before using position: absolute - but it seems they only work with position relative now. When using relative it uses the width which messes up the navigation bar. Using relative: http://d.pr/i/tp5R Using absolute: http://d.pr/i/j7r1 CSS for my sub-menu div.left_first_header ul.sub-menu { width: 125px; top: 14px; z-index: 2; height: 100%; position: absolute; -webkit-border-radius: 0px 0px 4px 4px; -moz-border-radius: 0px 0px 4px 4px; background: url(images/drop_down_bg.jpg); padding-left: 15px; padding-right: 15px; background-repeat: repeat; } jQuery for the drop down functionality jQuery(document).ready(function ($) { jQuery("ul.dropdown li").hover(function() { $('ul:first',this).css('visibility', 'visible'); }, function() { jQuery(this).removeClass("hover"); jQuery('ul:first',this).css('visibility', 'hidden'); }); }); My website http://wpvault.com/kahlam/ Considering it's 4am I've probably made a really stupid simple mistake. I apologise if I've missed anything.

    Read the article

  • Dojo - How to position tooltip close to text?

    - by user244394
    Like the title says i want to be able to display the tooltip close to the text, currently it is displayed far away in the cell. Tobe noted the tooltip positions correctly for large text, only fails for small text. In DOJO How can i position the tooltip close to the text? I have this bit of code snippet that display the tooltip in the grid cells. Screenshot attached, html <div class="some_app claro"></div> ... com.c.widget.EnhancedGrid = function ( aParent, options ) { var grid, options; this.theParentApp = aParent; dojo.require("dojox.grid.EnhancedGrid"); dojo.require("dojox.grid.enhanced.plugins.Menu"); dojo.require("dojox.grid.enhanced.plugins.Selector"); dojo.require("dojox.grid.enhanced.plugins.Pagination"); dojo.require("dojo.store.Memory"); dojo.require("dojo.data.ObjectStore"); dojo.require("dojo._base.xhr"); dojo.require("dojo.domReady!"); dojo.require("dojo.date.locale"); dojo.require("dojo._base.connect"); dojo.require("dojox.data.JsonRestStore"); dojo.require("dojo.data.ItemFileReadStore"); dojo.require("dijit.Menu"); dojo.require("dijit.MenuItem"); dojo.require('dijit.MenuSeparator'); dojo.require('dijit.CheckedMenuItem'); dojo.require('dijit.Tooltip'); dojo.require('dojo/query'); dojo.require("dojox.data.QueryReadStore"); // main initialization function this.init = function( options ) { var me = this; // default options var defaultOptions = { widgetName: ' Enhancedgrid', render: true, // immediately render the grid draggable: true, // disables column dragging containerNode: false, // the Node to hold the Grid (optional) mashupUrl: false, // the URL of the mashup (required) rowsPerPage: 20, //Default number of items per page columns: false, // columns (required) width: "100%", // width of grid height: "100%", // height of grid rowClass: function (rowData) {}, onClick: function () {}, headerMenu: false, // adding a menu pop-up for the header. selectedRegionMenu: false, // adding a menu pop-up for the rows. menusObject: false, //object to start-up the menus using the plug-in. sortInfo: false, // The column default sort infiniteScrolling: false //If true, the enhanced grid will have an infinite scrolling. }; // merge user provided options me.options = jQuery.extend( {}, defaultOptions, options ); // check we have minimum required options if ( ! me.options.mashupUrl ){ throw ("You must supply a mashupUrl"); } if ( ! me.options.columns ){ throw ("You must supply columns"); } // make the column for formatting based on its data type. me.preProcessColumns(); // create the Contextual Menu me.createMenu(); // create the grid object and return me.createGrid(); }; // Loading the data to the grid. this.loadData = function () { var me = this; if (!me.options.infiniteScrolling) { var xhrArgs = { url: me.options.mashupUrl, handleAs: "json", load: function( data ){ var store = new dojo.data.ItemFileReadStore({ data : {items : eval( "data."+me.options.dataRoot)}}); store.fetch({ onComplete : function(items, request) { if (me.grid.selection !== null) { me.grid.selection.clear(); } me.grid.setStore(store); }, onError : function(error) { me.onError(error); } }); }, error: function (error) { me.onError(error); } }; dojo.xhrGet(xhrArgs); } else { dojo.declare('NotificationQueryReadStore', dojox.data.QueryReadStore, { // // hacked -- override to map to proper data structure // from mashup // _xhrFetchHandler : function(data, request, fetchHandler, errorHandler) { // // TODO: need to have error handling here when // data has "error" data structure // // // remap data object before process by super method // var dataRoot = eval ("data."+me.options.dataRoot); var dataTotal = eval ("data."+me.options.dataTotal); data = { numRows : dataTotal, items : dataRoot }; // call to super method to process mapped data and // set rowcount // for proper display this.inherited(arguments); } }); var queryStore = new NotificationQueryReadStore({ url : me.options.mashupUrl, urlPreventCache: true, requestMethod : "get", onError: function (error) { me.onError(error); } }); me.grid.setStore(queryStore); } }; this.preProcessColumns = function () { var me = this; var options = me.options; for (i=0;i<this.options.columns.length;i++) { if (this.options.columns[i].formatter==null) { switch (this.options.columns[i].datatype) { case "string": this.options.columns[i].formatter = me.formatString; break; case "date": this.options.columns[i].formatter = me.formatDate; var todayDate = new Date(); var gmtTime = c.util.Date.parseDate(todayDate.toString()).toString(); var gmtval = gmtTime.substring(gmtTime.indexOf('GMT'),(gmtTime.indexOf('(')-1)); this.options.columns[i].name = this.options.columns[i].name + " ("+gmtval+")"; } } if (this.options.columns[i].sortDefault) { me.options.sortInfo = i+1; } } }; // create GRID object using supplied options this.createGrid = function () { var me = this; var options = me.options; // create a new grid this.grid = new dojox.grid.EnhancedGrid ({ width: options.width, height: options.height, query: { id: "*" }, keepSelection: true, formatterScope: this, structure: options.columns, columnReordering: options.draggable, rowsPerPage: options.rowsPerPage, //sortInfo: options.sortInfo, plugins : { menus: options.menusObject, selector: {"row":"multi", "cell": "disabled" }, }, //Allow the user to decide if a column is sortable by setting sortable = true / false canSort: function(col) { if (options.columns[Math.abs(col)-1].sortable) return true; else return false; }, //Change the row colors depending on severity column. onStyleRow: function (row) { var grid = me.grid; var item = grid.getItem(row.index); if (item && options.rowClass(item)) { row.customClasses += " " +options.rowClass(item); if (grid.selection.selectedIndex == row.index) { row.customClasses += " dojoxGridRowSelected"; } grid.focus.styleRow(row); grid.edit.styleRow(row); } }, onCellMouseOver: function (e){ // var pos = dojo.position(this, true); // alert(pos); console.log( e.rowIndex +" cell node :"+ e.cellNode.innerHTML); // var pos = dojo.position(this, true); console.log( " pos :"+ e.pos); if (e.cellNode.innerHTML!="") { dijit.showTooltip(e.cellNode.innerHTML, e.cellNode); } }, onCellMouseOut: function (e){ dijit.hideTooltip(e.cellNode); }, onHeaderCellMouseOver: function (e){ if (e.cellNode.innerHTML!="") { dijit.showTooltip(e.cellNode.innerHTML, e.cellNode); } }, onHeaderCellMouseOut: function (e){ dijit.hideTooltip(e.cellNode); }, }); // ADDED CODE FOR TOOLTIP var gridTooltip = new Tooltip({ connectId: "grid1", selector: "td", position: ["above"], getContent: function(matchedNode){ var childNode = matchedNode.childNodes[0]; if(childNode.nodeType == 1 && childNode.className == "user") { this.position = ["after"]; this.open(childNode); return false; } if(matchedNode.className && matchedNode.className == "user") { this.position = ["after"]; } else { this.position = ["above"]; } return matchedNode.textContent; } }); ... //Construct the grid this.buildGrid = function(){ var datagrid = new com.emc.widget.EnhancedGrid(this,{ Url: "/dge/api/-resultFormat=json&id="+encodeURIComponent(idUrl), dataRoot: "Root.ATrail", height: '100%', columns: [ { name: 'Time', field: 'Time', width: '20%', datatype: 'date', sortable: true, searchable: true, hidden: false}, { name: 'Type', field: 'Type', width: '20%', datatype: 'string', sortable: true, searchable: true, hidden: false}, { name: 'User ID', field: 'UserID', width: '20%', datatype: 'string', sortable: true, searchable: true, hidden: false } ] }); this.grid = datagrid; };

    Read the article

  • Numerically stable(ish) method of getting Y-intercept of mouse position?

    - by Fraser
    I'm trying to unproject the mouse position to get the position on the X-Z plane of a ray cast from the mouse. The camera is fully controllable by the user. Right now, the algorithm I'm using is... Unproject the mouse into the camera to get the ray: Vector3 p1 = Vector3.Unproject(new Vector3(x, y, 0), 0, 0, width, height, nearPlane, farPlane, viewProj; Vector3 p2 = Vector3.Unproject(new Vector3(x, y, 1), 0, 0, width, height, nearPlane, farPlane, viewProj); Vector3 dir = p2 - p1; dir.Normalize(); Ray ray = Ray(p1, dir); Then get the Y-intercept by using algebra: float t = -ray.Position.Y / ray.Direction.Y; Vector3 p = ray.Position + t * ray.Direction; The problem is that the projected position is "jumpy". As I make small adjustments to the mouse position, the projected point moves in strange ways. For example, if I move the mouse one pixel up, it will sometimes move the projected position down, but when I move it a second pixel, the project position will jump back to the mouse's location. The projected location is always close to where it should be, but it does not smoothly follow a moving mouse. The problem intensifies as I zoom the camera out. I believe the problem is caused by numeric instability. I can make minor improvements to this by doing some computations at double precision, and possibly abusing the fact that floating point calculations are done at 80-bit precision on x86, however before I start micro-optimizing this and getting deep into how the CLR handles floating point, I was wondering if there's an algorithmic change I can do to improve this? EDIT: A little snooping around in .NET Reflector on SlimDX.dll: public static Vector3 Unproject(Vector3 vector, float x, float y, float width, float height, float minZ, float maxZ, Matrix worldViewProjection) { Vector3 coordinate = new Vector3(); Matrix result = new Matrix(); Matrix.Invert(ref worldViewProjection, out result); coordinate.X = (float) ((((vector.X - x) / ((double) width)) * 2.0) - 1.0); coordinate.Y = (float) -((((vector.Y - y) / ((double) height)) * 2.0) - 1.0); coordinate.Z = (vector.Z - minZ) / (maxZ - minZ); TransformCoordinate(ref coordinate, ref result, out coordinate); return coordinate; } // ... public static void TransformCoordinate(ref Vector3 coordinate, ref Matrix transformation, out Vector3 result) { Vector3 vector; Vector4 vector2 = new Vector4 { X = (((coordinate.Y * transformation.M21) + (coordinate.X * transformation.M11)) + (coordinate.Z * transformation.M31)) + transformation.M41, Y = (((coordinate.Y * transformation.M22) + (coordinate.X * transformation.M12)) + (coordinate.Z * transformation.M32)) + transformation.M42, Z = (((coordinate.Y * transformation.M23) + (coordinate.X * transformation.M13)) + (coordinate.Z * transformation.M33)) + transformation.M43 }; float num = (float) (1.0 / ((((transformation.M24 * coordinate.Y) + (transformation.M14 * coordinate.X)) + (coordinate.Z * transformation.M34)) + transformation.M44)); vector2.W = num; vector.X = vector2.X * num; vector.Y = vector2.Y * num; vector.Z = vector2.Z * num; result = vector; } ...which seems to be a pretty standard method of unprojecting a point from a projection matrix, however this serves to introduce another point of possible instability. Still, I'd like to stick with the SlimDX Unproject routine rather than writing my own unless it's really necessary.

    Read the article

  • Set cursor position in a UITextField (Monotouch)

    - by manuel
    In a UITextView used for entering decimal numbers I would like to get rid of possible leading zeros (The behavior should be like the one of the Calculator App). Normally this would be rather easy to implement but I just cannot figure out how to restore the cursor position. UITextField has a property SelectedTextRange of type UITextRange which can be used to get the cursor position. However, there seems no easy way to get the current index nor to create a new UITextRange object that contains the new values. I could find the solution in objective c: Finding the cursor position in a UITextField It is however very unclear to me how to rewrite that in Monotouch. Any help with this would be highly appreciated. Thanks, Manuel

    Read the article

  • Binding the position and size of a UserControl inside a Canvas in WPF

    - by John
    Hi. We have dynamically created (i.e. during runtime, via code-behind) UserControls inside a Canvas. We want to bind the position (Canvas.Left and Canvas.Top) and width of those sizable and draggable UserControls to a ObservableCollection<. How would we achieve this if the Usercontrol is contained in a DataTemplate which in turn is used by a ListBox whose DataContext is set to the collection we want to bind to? In other words, how do we bind a control's position and size that doesn't exist in XAML, but in code only (because it's created by clicking and dragging the mouse)? Notice that the collection can be empty or not empty, meaning that the size and position stores in a collection item must be correctly bound to so that the UserControl can be sized and positioned correctly in the Canvas - via DataBinding. Is this possible?

    Read the article

  • JEditorPane scrolling to the current caret position

    - by Elliott
    I have a JEditorPane which I use to display an HTML document. the document has hyperlinks embedded in it. When a user clicks on a bookmark a position the caret to the associated place in the JeditorPane. The JeditorPane is then suppose to scroll to this position. This works mostly. But, I noticed that if the document has a lot of "break tags" (BR) tags embedded in it, the scrolling does not position the JEditorPane to right place. It's like the tags throw the callebration off. Any suggestions on what to do about this?

    Read the article

  • Drag and drop image from and to fixed position on fixed path

    - by DMan
    I am trying to allow the user to drag and drop and image from on position to another. The screen layout is as follows: 1 2 3 4 5 6 7 8 9 I want the user to grab image 2, 4, 6, or 8 and drag it to image 5. Upon dragging to image 5 I want to load up a fragment. The user can only drag the image in a straight line from it's current position to 5's position. ie image 2 and only drag down and only until it is overtop of image 5, image 4 can only drag right until overtop of 5, etc. Any insight on how to do this is greatly appreciated. Thanks, DMan

    Read the article

  • JQuery UI sortable: restore position based on some condition

    - by dafi
    I call sortable.stop() to make an ajax call to store some data after drag&drop operation. When the ajax call returns an error (application logic error or net problem) I want to move the dragged element to its original/start position, how can I achieve it? The scenario should be user drags A to B the sortable.stop() event is called, it triggers an ajax call the ajax call returns an error inside the stop() event we get the ajax error move A to its original position user again move A to B everything is ok A remains in its new position in B Steps 6-8 are shown to clarify a successive drag can be done and previous error must be forgotten

    Read the article

  • Returning partial address matches and mismatch position using L2S or SQL

    - by peter3
    I need to implement a method that takes an address split up into individual parts and returns any matching items from an address table. If no matches are found, I want to be able to return a value indicating where it failed. Each input param has a corresponding field in the table. The signature would look something like this: List<Address> MatchAddress(string zipCode, string streetName, string houseNumber, string houseLetter, string floor, string appartmentNo, out int mismatchPosition) { // return matching addresses // if none found, return the position where it stopped matching // zipCode is position 0, appartmentNo is position 5 // // an empty param value indicates "don't check" } I know I can construct the method such that I start with all the parameters, execute the query and then remove param by param (from the right side) until either a match is found or I run out of parameters, but can I construct a query that is more effective than that, i.e minimizing the number of calls to the db, maybe even as a single call?

    Read the article

  • align div right with position fixed

    - by Pradyut Bhattacharya
    Hi i want to show a div which is always visible with the user as the user scrolls the page are there any javascript solutions?? i have used the css position:fixed; Now i want to show the div at the right hand corner of the parent div i used the css .test { position: fixed; text-align: right; } but that doesn't work with position:fixed; For that i used the css but i think nothing works on the top of postilion fixed My example page here the div i want to align is "test" under the parent class "parent" Is there any solution or any other javascript solution to this... thanks Pradyut India

    Read the article

  • Setting Position of NSWindow before Display

    - by Armin Ronacher
    Right now I'm setting the position of a window that is about to open like this: -(void) setActiveNodeDialog:(ISKNodeDialogController *)dialog { if (activeNodeDialog) [[activeNodeDialog window] close]; activeNodeDialog = dialog; if (activeNodeDialog) { [activeNodeDialog setMainWindowController:self]; NSRect windowRect = [[self window] frame]; NSRect dialogRect = [[activeNodeDialog window] frame]; NSPoint pos; pos.x = windowRect.origin.x + windowRect.size.width - dialogRect.size.width - 10; pos.y = windowRect.origin.y + 32; [[activeNodeDialog window] setFrameOrigin:pos]; [[activeNodeDialog window] makeKeyAndOrderFront:nil]; } } The problem with that is, that the window will "jump" when shown. And that even though I set the position before showing the window with "makeKeyAndOrderFront". The window is a NSPanel *. Anyone any ideas how to fix the jumping? Setting the position in awakeFromNib is not an option because the main controller is set later.

    Read the article

  • CSS Put image at top of page

    - by happyCoding25
    Hi, I need to have an image at the top-center of a web page in css. Now, Im just using the background-image: in css but this puts it at the middle of the page. Here's my code: body { background-image: url("theimageurlgoeshere"); //The image is 842 x 508 background-attachment:fixed; background-position: center top; background-repeat: no-repeat; } Also, Changing the background-position: seems to have no effect on the outcome of the site. Any help is appreciated.

    Read the article

  • How to get the position of a record in a table (SQL Server)

    - by Peter Siegmann
    Following problem: I need to get the position of a record in the table. Let's say I have five record in the table: Name: john doe, ID: 1 Name: jane doe, ID: 2 Name: Frankie Boy, ID: 4 Name: Johnny, ID: 9 Now, "Frankie Boy" is in the third position in the table. But How to get this information from the SQL server? I could count IDs, but they are not reliable, Frankie has the ID 4, but is in the third position because the record with the ID '3' was deleted. Is there a way? I am aware of ROW_RANK but it would be costly, because I need to select basically the whole set first before I can rank row_rank them. I am using MS SQL Server 2008 R2.

    Read the article

  • Set Caret position with JTextArea in JScrollPane

    - by Albinoswordfish
    Right now I have a JTextArea inside of a JScrollPane. For the current content it has both a vertical and horizontal scroll bar showing up. I'm trying to implement a search functionality where a user can search for a certain string and it will set the caret position to the first occurrence of that string. However it seems that JScrollPane only scrolls vertically when I set my caret position. So matching strings going off the JTextArea horizontally will completely get missed and the horizontal scroll bar won't scroll at all. I'm using the basic function setCaretPosition() for the JTextArea Does anybody have any idea why my JScrollPane isn't moving horizontally using setCaretPosition() Edit: It appears the horizontal scroll bar is scrolling but it moves so little that it's barely noticeable. I can only see the very first pixel of the character. Is there a way to have the scrollbar center (or as much as possible) to the caret position?

    Read the article

  • Java Formatter specify starting position for text

    - by purecharger
    I'm trying to position a string at a certain starting position on a line, regardless of where the previous text ended. For instance: Mandatory arguments to long options are mandatory for short options too. -a, --all do not ignore entries starting with . -A, --almost-all do not list implied . and .. The explanation of the options begin at position 30 regardless of the text preceding. How do you accomplish this with java.util.Formatter? I have tested with both the width (%30s) and precision (%.30) arguments, and neither provide the desired result.

    Read the article

  • absolute positioned element clipping if position outside its parent item IE7

    - by yazz
    Hi Im trying to position an element so its slightly positioned outside its parent item. In IE8 it works but in IE7 the positioned element gets clipped. Here's my code HTML: <div id="parent"> <div id="child">text</div> </div> The CSS #parent { height: 40px; width: 400px; position: relative; } #child { position: absolute; width: 100px; height: 60px; top: 0px; left: 0px; } In IE7 you will see that the last 20px of the child element gets clipped. How can I solve this? THX

    Read the article

  • set div position to fixed after scrolling 100px?

    - by user1481850
    I tried to use the following function in order to set the div's position to 100 px from top after scrolling 100 px. <script src="http://code.jquery.com/jquery-latest.js"></script> <script type="text/javascript"> $(window).scroll(function(){ $("#header").css("top",Math.max(0,100-$(this).scrollTop())); }); </script> <div class="header" style="position:fixed;top:100px;background-color:red">something</div> it is not working(the div stick to it's fixed position). it seems that the function is not relating to the div. what is my problem ?

    Read the article

  • How to get the handler position

    - by Geetha
    Hi All, I am using the following files to create a slider. <link type="text/css" href="CSS/demos.css" rel="stylesheet" /> <link type="text/css" href="CSS/jquery-ui.css" rel="stylesheet" /> <script type="text/javascript" src="js/jquery.ui.core.js"></script> <script type="text/javascript" src="js/jquery.ui.slider.js"></script> Problem: i want to get the index of the handler, when i drag it to some other position. Ex: initial position of the handler: l-------------------------------- value = 0 After dragging it some other position ----------------------l---------- value = ? Code: var endTime = document.mediaPlayer.SelectionEnd; $("#slider-constraints").slider({ animate: true, max: endTime, range: $R(0, endTime), value: 1, enforceConstraints: false, start: function(event, index) { alert(index.value); } }); window.setInterval(function() { $('#slider-constraints').slider("value", document.mediaPlayer.currentPosition); }, 4000);

    Read the article

  • css position when resizing browser

    - by user478636
    When resizing the browser I noticed that all the elements get out of place and the website layout gets distorted. This also occurs on with low-resolution. Is this because I have used position:relative;? How can I make the page elements not move from their position when resizing. body{ background:url(../img/bg-silver.jpg) #F2F2F2; font-family:"Lucida Sans Unicode", "Lucida Grande", sans-serif; font-size:11px; line-height:18px; color:#636363; margin-top:10%; } #containerHolder { background: #eee; padding: 5px; position:relative; } #container { background: #fff; background:rgba(245,245,245,0.8); border: 1px solid #ddd; } #main { margin: 0 0 0 20px; padding: 0 19px 0 0; }

    Read the article

  • Minimized window position in WPF

    - by DrLazer
    I am trying to save the position of a custom dialog to the users registry, so that when they reload the same dialog, it appears in the same place they moved or resized it to previously. I am saving the windows X position Y position Width and Height. It all works fine except for when the dialog is minimized. If the dialog is minimized and the user right clicks the dialogs representation on the taskbar (windows 7) they can click "close this window". Strangely, the number -32030 gets saved in the registry as the X and Y positions but the width and height get saved correctly. Any idea where this number comes from and what to do in this situation thx

    Read the article

  • terminal: where am I?

    - by sid_com
    Is there a variable or a function, which can tell me the actual position of the cursor? #!/usr/bin/env perl use warnings; use 5.012; use Term::ReadKey; use Term::Cap; use POSIX; my( $col, $row ) = GetTerminalSize(); my $termios = new POSIX::Termios; $termios->getattr; my $ospeed = $termios->getospeed; my $terminal = Tgetent Term::Cap { TERM => undef, OSPEED => $ospeed }; # some movement ... # at which position (x/y) is the cursor now?

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >