Search Results

Search found 2724 results on 109 pages for 'absolute positioning'.

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

  • C# textbox cursor positioning

    - by Jim
    I feel like I am just missing a simple property, but can you set the cursor to the end of a line in a textbox? private void txtNumbersOnly_KeyPress(object sender, KeyPressEventArgs e) { if (Char.IsDigit(e.KeyChar) || e.KeyChar == '\b' || e.KeyChar == '.' || e.KeyChar == '-') { TextBox t = (TextBox)sender; bool bHandled = false; _sCurrentTemp += e.KeyChar; if (_sCurrentTemp.Length > 0 && e.KeyChar == '-') { // '-' only allowed as first char bHandled = true; } if (_sCurrentTemp.StartsWith(Convert.ToString('.'))) { // add '0' in front of decimal point t.Text = string.Empty; t.Text = '0' + _sCurrentTemp; _sCurrentTemp = t.Text; bHandled = true; } e.Handled = bHandled; } After testing for '.' as first char, the cursor goes before the text that is added. So instead of "0.123", the results are "1230." without moving the cursor myself. I also apologize if this is a duplicate question.

    Read the article

  • I want absolute atomicity on a single couchdb instance (insert, fail if already existing)

    - by MatternPatching
    I've come to really love the couchdb style of organizing and updating data, but there are a few situations where I really need to be able to create an entry and determine if an equivalent entry is already in existence before returning to the user. The only situation that this is absolutely necessary for my application is user registration. I'm fine with having all user registration writes go to a particular, designated couchdb instance known as the "registration-instance". I want to hash the user_id into some _id to use. Then execute a put with this _id, but fail if the _id is already inserted. I need to return to the user that the user name is already reserved, and I cannot detect the conflict later and resolve it at that point, because the user would be under the impression that they had reserved the user name. I don't see why couchdb couldn't provide some way to do this, under the assumption that you designate that inserts for a particular "type" of document always are routed to a particular instance.

    Read the article

  • Flex 3 custom components positioning - popups

    - by ccdugga
    Hi, I have created a custom TitleWindow whcih i use as a popup. The contents of the popup are created dynamically depending on a selection a user makes from a datagrid. My problem is, my datagrid is in another custom component whcih is toward the bottom of my page so when a user clicks one of the items the popup is displayed however with half of it out of sight at the bottom of the page. Is there a way to position a popup so that it displays at the top of the page?

    Read the article

  • Google Maps for Absolute Dummies

    - by decbrad
    Hi there, I just signed up for a Google Maps API key and was hoping for a wizard style application for setting up the map (not a static one), unfortunately I was immediately blinded by science! Can anyone point me to a tutorial where I can find out how to create a simple google map and place a callout bubble including am image of the office and address details. Thanks in advance Decbrad

    Read the article

  • Fixing CSS positioning and scaling

    - by Louis
    I was contemplating writing a UI toolkit where setting the position and size of an element/widget was intuitive and powerful. Here are some examples of how it would be used (not currently implemented): ui("Panel").size(". 40").pos("0 0").attach(element); ui("Textarea").size(". %-10").pos("0 40").attach(element); ui("Panel").size(". 10").pos("0 bottom+5"); Where . means auto, % means 100% and the possibility to add pixels to percentages. Does anything like said exist (even as a jQuery plugin or something)? Somethings just aren't possible with pure CSS.

    Read the article

  • Vertical positioning of text in table cell

    - by Robert
    When I place an image followed by text in a table cell, the vertical alignment of the text shifts down compared to text in adjacent cells. I tried using a line-height CSS property, but it didn't seem to have an affect. In the following example, I need "123 Description" to be flush with "cell one." Also, there is a space between the image and "123" by default. How can I adjust that - negative margins perhaps? <html <head <style type="text/css" table { border-collapse: collapse; } td { border: thin solid; width: 10em;} /* .adjust-text { line-height: 1.3em; } */ </style </head <body <table <tbody <tr <tdcell one</td <td <img src="small-star.png" / <span class="adjust-text"123 Description</span </td </tr </tbody </table </body </html

    Read the article

  • Absolute URL Path for PHP Website

    - by kakaajee
    Hi friends, I am working on a website in a CMS site. I have provided a link in my footer file e.g blogs.php. This page is at the root like "http://www.example.com/new_cms/blogs.php" When I moves to other files link like "http://www.example.com/new_cms/forums" the footer link is changed to "http://www.example.com/new_cms/forums/blogs.php" but the blogs.php page resides at path "http://www.example.com/new_cms/" . I tried different $_SERVER[] variables but got no luck to get the above path "http://www.example.com/new_cms/" means the server name with the directory where the project is currently running from. Any one have idea how to get it done will be a great help. Thanks

    Read the article

  • Positioning the dialog box in the centre of the screen

    - by ame
    I have a dialog box developed in mfc for a Windows CE device and want it to occupy the entire screen. I used the following code to center my dialog box on the lcd screen of the device: CWnd* pWnd = GetDesktopWindow(); CenterWindow(pWnd); However, I still get a tiny sliver of space on the left side of the dialog box, resizing the dialog merely makes it overflow on the right side of the LCD while the tiny space on the left remains (I can see the blue of the win CE desktop behind.) Are there any suggestions to solve this problem? I checked the margin settings for this dialog box in my .rc files and leftmargin and topmargin are both set to 0. I was wondering if I could get the coordinates of the centre of the screen and then place my window one or two points to the left to deal with the current offset. A messy approach I know!

    Read the article

  • jQuery UI dialog positioning

    - by Wickethewok
    I am trying to use the jQuery dialog UI library in order to position a dialog next to some text when it is hovered over. The jQuery dialog takes a position parameter which is measured from the top left corner of the current viewport (in other words, [0, 0] will always put it in the upper left hand corner of your browser window, regardless of where you are currently scrolled to). However, the only way I know to retrieve the location is of the element relative to the ENTIRE page. The following is what I have currently. position.top is calculated to be something like 1200 or so, which puts the dialog well below the rest of the content on the page. $(".mytext").mouseover(function() { position = $(this).position(); $("#dialog").dialog('option', 'position', [position.top, position.left]); } How can I find the correct position? Thanks!

    Read the article

  • Autocad 2014 - Positioning electrical objects for plans (icons and symbols, not actual objects)

    - by zazkapulsk
    I am using Autocad to design my home. I am at a phase where I want to set the location for the switches, lighting fixtures, power sockets, communication sockets etc. I am thinking of something like this http://www.the-house-plans-guide.com/electrical-blueprint-symbols.html. I am not interested in placing specific lighting fixtures or rendering them, just putting the symbol and distances for the symbol. I can use Autocad Electrical, but that's a GIANT overshoot. What am I missing? Thanks.

    Read the article

  • absolute audio synchronization

    - by user1780526
    I would like to synchronize my computer with an external camcorder recording so that I can know exactly (to the millisecond) when certain recored events happen with respect to other sensors logged by the computer. One idea is to playback short sound pulses or chirps every second from the computer that get picked up by the microphone on the camcorder. But the accuracy of a simple cron job playing a sound clip is not precise enough. I was thinking of using something like gstreamer, but how does one get it to playback a clip at precisely a certain time according to the system clock?

    Read the article

  • HTML5: Rendering absolute images using canvas

    - by Mark
    I am experimenting with canvas as part of my HTML5 introduction. This constitutes as assignment work, but I am not asking for any help on the actual coursework at all. I am trying to write a rendering engine, but having no luck because once the image is drawn on canvas it looks very distorted, and not at the right dimensions of the image itself. I have made a animation engine that loads images into an array, and then iterates through them at a certain speed. This is not the problem, and I assume is not causing the issue as this was happening when I drawn an image to the canvas. I think this is natural behaviour for images to be scaled/skewed when the window is resized, so I conquered that by simply redrawing the whole thing once the window is resized. The images I am using are isometric, and drawn at a pixel level. Would this cause the distortion? It seems setting the dimensions on the drawImage() function are not working are all. I am using JavaScript for the manipulation and rendering of the canvas. I would normally try and work it out myself, but I do not have any time to ponder why because I have no idea why it is even scaling/skewing the image once it is drawn on the canvas. I cannot share the code for obvious reasons. I should also mention, the canvas's dimension is the total width of the viewport, as I am developing a game. My question is: Has anyone encountered this and how would I correct it? Thanks for your help.

    Read the article

  • positioning a div bottom of the page and keep content above

    - by Andy
    I have the following CSS which positions a div at the bottom of the page but how can i stop content flowing underneath it. #footer { position:fixed; bottom:0; background:url(../images/bg-footer.jpg) top; z-index:200; height:34px; width:100%; line-height:34px; padding:0; font-size:11px; color:#fff; } I cant add padding to the body or anything because i have a fullscreen background image in place as per this tutorial: http://css-tricks.com/how-to-resizeable-background-image/ Any help would be appreciated.

    Read the article

  • Clear Absolute Cache on Application close Ipad app

    - by geeth
    I am saving Images in NSCachesDirectory in a App. At the end of app execution i would like to clear all temporary cache. Is there a way to force clear all cache on application exit. I do realise the local folder keeps cache for 3 days..but my requirement is to force clear the Cache. Thx

    Read the article

  • Getting a divs z-index to overlap a div with absolute positioning

    - by Paul Herron
    Does anyone know how I could get the logo at the top of my page to appear on top of the curtains. http://nuigums.tumblr.com/ The logo is within a section tag along with the rest of the content with a z-index of 2, which is required to get the footer reveal effect I want. The curtain has a z-index of 3. I tried setting the z-index of the logo div to 4 but I presume the fact that the sections styling overrides that? I would like the logo to scroll with the content of the page also. Thanks. :)

    Read the article

  • Positioning child panels using FlowLayout

    - by extro
    I have two panels: main_panel child_panel The main_panel layout is set using: main_panel.setLayout(flowlayout) I then added child_panel to main_panel: main_panel.add(child_panel) The child_panel gets added to main_panel but its position is at the cross-section of horizontal midpoint and top vertical section of screen. I want child_panel to be at the top left corner, something I could have done by using child_panel.setlocation(a,b) method, if I have set the layout of main_panel as null. I have used FlowLayout here because I want components in the JPanel to keep adjusting with the size of JFrame. So can I add child_panel to main_panel at the exact location I want, even if I set the Layout of main_panel as not null?

    Read the article

  • Chrome/IE table cell positioning help

    - by Checksum
    I am making a tiny script to make a HTML element editable. When you click on an element, it gets replaced with a textarea, and you can basically enter the new text. When you press enter, the textarea is replaced with the original element with its innerHTML updated. The demo of the script is here: http://iambot.net/demo/editable/ Now the problem is with the inline table editing. It works perfectly on FF 3.6, but on Chrome/Safari, once the value of a cell is updated, the position of the updated cell shifts to the right by the width of a cell.(Just try the demo in Chrome/Safari) It totally messes up the whole table. I am a beginner in CSS and not able to identify where exactly I'm going wrong. Any help/pointers appreciated! Thanks.

    Read the article

  • Can't Prevent Nested Div's from Overflowing when using Percent Sizes and Padding in CSS?

    - by viatropos
    I want to be able to layout nested divs with these properties: width: 100% height: 100% padding: 10px I want it to be such that, the children are 100% width and height of the remaining space after padding is calculated, not before. Otherwise, when I have a document like the below example, the child makes the scrollbars appear. But the scrollbars are not the main issue, the fact that the child stretches beyond the width of the parent container is. I can use all position: absolute declarations, but that doesn't seem right. Here is the code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta http-equiv="X-UA-Compatible" content="IE=7"> <title>Liquid Layout</title> <style> body, html { width:100%; height:100%; margin:0; padding:0; background-color:black; } #container { position:relative; width:100%; height:100%; background-color:red; opacity:0.7; } #child1 { position:relative; width:100%; height:100%; padding:10px; background-color:blue; } #nested1 { position:relative; background-color: white; width:100%; height:100%; } </style> </head> <body> <div id="container"> <div id="child1"> <div id="nested1"></div> </div> </div> </body> </html> How do I make it so, using position:relative or position:static, and percent sizes, the percents size the children according to the parent's width/height minus padding and margins? Do I have to resort to position:absolute and left/right/top/bottom? Thanks for the help, Lance

    Read the article

  • jQuery dialog width resizing problem

    - by ktMen
    I try to load some HTML code into a jQueryUI dialog by AJAX. The code itself is a list, where rightmost elements should be absolutely positioned so that the list looks like a table with two columns, but only in some rows. The problem is that jQueryUI plugin does not seem to be correctly resizing the dialog's width, which I think is due to the absolute positioning of some li's. I have read some answers to other similar questions, but none helped me out with this. This is the code I load: <style type="text/css"> ul {list-style-type:none;margin:0px;padding:0px;} ul ul {margin:0px;padding:0px;} ul>li.fila {margin-bottom:5px;padding-bottom:5px;} ul li.fila ul li { display:inline; padding-left:20px; position:relative; margin-bottom:10px; } ul li.fila ul li.O { background:url(bullet.gif) 5px 8px no-repeat; list-style-position:inside; } </style> <ul id="raiz" > <li class="fila"> <ul > <li style="position:absolute;left:0px;" class="O"> <label for="col1">Col1:</label> <input type="text" name="col1" id="col1" value="vCol1" class="text ui-widget-content ui-corner-all" /> </li> <li style="left:250px;" class="O" > <label for="col2">Col2:</label> <input type="text" name="col2" id="col2" value="vCol2" class="text ui-widget-content ui-corner-all" /> </li> </ul> </li> <li class="fila"> <ul > <li> <label for="col3">Col3:</label> <input type="text" name="col3" id="col3" value="vCol3" class="text ui-widget-content ui-corner-all" /> </li> </ul> </li> </ul> And the Dialog constructor: $("#dialog").dialog({ bgiframe: true, autoOpen: false, height: 'auto', width: 'auto', modal: true, buttons:{ 'Cancel': function() { $(this).dialog('close'); } }, open: function(event,ui){ $("#dialog").load("dialogCode.html"); } }); Thanks in advance for any suggestions.

    Read the article

  • how do I make my submenu position dynamic based on the distance to the edge of the window?

    - by Mario Antoci
    I'm trying to write a jQuery script that will find the distance to the right edge of the browser window from my css class element and then position the child submenu dropdowns to the right or left depending on the available space to the right. Also it needs to revert to the default settings on hoverout. Here is what I have so far but it's not calculating properly. $(document).ready(function(){ $('#dnnMenu .subLevel').hover(function(){ if ($(window).width() - $('#dnnMenu .subLevel').offset().left - '540' >= '270') { $('#dnnMenu .subLevelRight').css('left', '270px');} else {$('#dnnMenu .subLevelRight').css('left', '-270px');} }); $(document).ready(function () { function HoverOver() { $(this).addClass('hover'); } function HoverOut() { $(this).removeClass('hover'); } var config = { sensitivity: 2, interval: 100, over: HoverOver, timeout: 100, out: HoverOut }; $("#dnnMenu .topLevel > li.haschild").hoverIntent(config); $(".subLevel li.haschild").hover(HoverOver, HoverOut); }); Basically I tried to take the width of the current window, minus the distance to the left edge of the browser of the first level submenu, minus the width of both elements together which would equal 540px, to calculate the distance to the right edge of the window when the first level submenu is hovered over. if the distance to the right of my first level submenu element is less than 540px then the second level sub menu css property is changed to position to the left instead of right. I also know that it needs to revert back to default after hover out so it can recalculate the distance from other positions within the menu structure and still have those second level submenus with enough room to still display on the right of the first level. here is css for the elements in question. #dnnMenu .subLevel{ display: none; position: absolute; margin: 0; z-index: 1210; background: #639ec8; text-transform: none;} #dnnMenu .subLevelRight{ position: absolute; display: none; left: 270px; top: 0px;} The site's not live yet and I tried to create a jsfiddle but it doesn't look right. Any help would be greatly appreciated! Best Regards, Mario

    Read the article

  • Align text with bottom as it comes in during a chat?

    - by Andrew
    I'm building a custom web chat application, and while I have the basics worked out, I've been wondering if this was possible... right now, the chat comes in at the top of the div, and when it reaches the bottom, the div starts scrolling. This works. This is great. But I was wondering if it was possible to create it more like an IRC client, where the chat comes in initially at the bottom of the div, then each new line comes in below the old ones, etc, and again, when the div is full, it starts scrolling. I've managed to get part of this working: I can get it displaying this way. But I can't find a way to scroll it; either the scroll doesn't appear (when there's no overflow on the inner, text div, despite there being an overflow on the outer, container div), or it's confined to the width of the text rather than the width of the container div. Some options I've tried: <div id="chatbox" style="overflow: auto; position: relative; width: 100%; height: 400px;"> <div id="chatmessages" style="overflow: auto; position: absolute; bottom: 0;"></div></div> This has the text appear properly at the bottom, but no scrollbar ever appears. <div id="chatbox" style="overflow: auto; position: relative; width: 100%; height: 400px;"> <div id="chatmessages" style="overflow: scroll; position: absolute; bottom: 0;"></div></div> This has the text appear properly at the bottom, and a scrollbar appears, but it's only ever as wide as the text, even if width=100%... and when the text reaches the top, the scrollbar remains gray. Basically, do I want the scrollbar on the inner or the container div, is this even possible, how do I force it to work, and am I going about this entirely wrong?

    Read the article

  • CSS: my side bar overflow the container div's border when I set it's height to 100%

    - by mnml
    Hi, My side bar overflow the container div's border when I set it's height to 100%, I would like to know if there is any way I can have it's height 100% minus some px. Here is the source: <div id="main"> <br /><br /> <div class="content"> <div id="sidecontent"> <h1 id="title">Title</h1> ***** </div> <div id="sidebar"> <div class="sidebox"> **** </div> </div> </div> <div class="bottom"></div> </div> #main { position: relative; background:transparent url('/public/images/main_bg.png') top left repeat-y; padding:37px 37px 37px 37px; margin-left: auto ; margin-right: auto ; width:940px; min-height: 363px; } #main div.top, #main div.bottom { height:70px; width:1015px; position: absolute; left:0px; } #main div.content { padding:0 15px 0 15px; } #sidecontent { width: 675px; } #sidebar { background: #fff url('/public/images/bg_side.png') top right repeat-y; position: absolute; height: 100%; right:34px; top:42px; width: 200px; padding: 10px 10px 0px 40px; z-index:50; } .created_at { color:gray; } .sidebox { margin-bottom: 5px; } #main div.top { top:-70px; background: transparent url(/public/images/main_top.png) bottom no-repeat; } #main div.bottom { bottom:-70px; background: transparent url(/public/images/main_bottom.png) top no-repeat; }

    Read the article

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