Search Results

Search found 3114 results on 125 pages for 'horizontal scrolling'.

Page 20/125 | < Previous Page | 16 17 18 19 20 21 22 23 24 25 26 27  | Next Page >

  • Horizontal and vertical center text inside div

    - by Christophe Herreman
    I have a div with a background image that needs to be centered horizontally and vertically. On top of that image, I also want to display some text, also centered horizontally and vertically. I managed to get the image centered, but the text is not centered vertically. I thought vertical-align:middle would do the trick. Here's the code I have: <div style="background: url('background.png') no-repeat center; width:100%; height:100%; text-align:center;"> <div style="color:#ffffff; text-align: center; vertical-align:middle;" > Some text here. </div> </div> Any ideas?

    Read the article

  • Vertical text in a Horizontal UIButton

    - by ArQangel
    I'm using a vertical UIButton in a portrait app (Just a normal button that is of width 60 and Height 160) I want to put the label Vetically down the button instead of across it. When I use the following code to rotate the label [workPackageButton.titleLabel setTransform:CGAffineTransformMakeRotation(M_PI / 2)]; It rotates the label but the length seems to be constrained by the original width, so I get the ... abreviation in the middle. Is there an easy way round this?

    Read the article

  • Find most right and left point of a horizontal circle in 3d Vector environment

    - by Olivier de Jonge
    I'm drawing a 3D pie chart that is rendered with in 3D vectors, projected to 2D vectors and then drawn on a Graphics object. I want to calculate the most left and right point of the circle The method to create a vector, draw and project to a 2d vector are below. Anyone knows the answer? public class Vector3d { public var x:Number; public var y:Number; public var z:Number; //the angle that the 3D is viewed in tele or wide angle. public static var viewDist:Number = 700; function Vector3d(x:Number, y:Number, z:Number){ this.x = x; this.y = y; this.z = z; } public function project2DNew():Vector { var p:Number = getPerspective(); return new Vector(p * x, p * y); } public function getPerspective():Number{ return viewDist / (this.z + viewDist); } }

    Read the article

  • Making JQuery horizontal accordion close on click

    - by user310404
    Example: http://vincent-massaro.com/map/ Currently, the script allows you to click on a piece of the accordion to open it, but it is set to close on mouseleave. When I set the mouseleave to .click, it gets confused and doesn't know what state it is in. The code controlling this is below, and the full script is in haccordion.js linked in the page source. If someone could help me modify this script, I would be very grateful! Thanks in advance. $target.click(function(){ haccordion.expandli(config.accordionid, this) config.$lastexpanded=$(this) }) if (config.collapsecurrent){ //if previous content should be contracted when expanding current $target.mouseleave(function(){ $(this).stop().animate({width:config.paneldimensions.peekw}, config.speed) }) }

    Read the article

  • CSS: Parent-Div does not grow with it's children (horizontal)

    - by vyden_st
    I would like the parent-div (red) to grow with the green child-div. Now it just stops at the viewport. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html lang="de" xmlns="http://www.w3.org/1999/xhtml" xml:lang="de"> <head> <title>simple document</title> <style type="text/css"> * { font-family: verdana; margin: 0px; padding: 0px; } </style> </head> <body> <div style="margin: 30px; background: red; padding: 10px;"> <div style="background: green; width: 2000px;">dxyf</div> </div> </body> </html> I don't want to use display:table; since it does not work well in IE. Any ideas?

    Read the article

  • jQuery Horizontal scroll with unknown width of items

    - by Gorm Casper
    I am creating a gallery using jQuery which displays pictures horizontally, with a "left" and "right" button below, that scrolls the row of images. There are plenty of tutorials and plugins for this. The problem for me though, is that 1) I don't know the width of the images. And 2) I need the item I scroll to, to be centered. How do I go about this? Thanks a lot, Gorm

    Read the article

  • Inline horizontal spacer in HTML

    - by LeafStorm
    I am making a Web page with a slideshow, using the same technique used on http://zine.pocoo.org/. The person I'm making the site for wants the slideshow to be centered. However, some of the photos are portrait layout and some are landscape. (This was not my choice.) I need a position: absolute to get the li's containing the items in the right place, so centering them does not work. (At least, not by normal methods.) So, I thought that it might work to insert a 124-pixel "spacer" before the image on the portrait pictures. I tried it with a <span style="width: 124px;">&nbsp;</span>, but it only inserts a single space, not the full 124 pixels. The slideshow fades in and out OK, though, so I think that it would work if I could get the proper spacing. My question is this: does anyone know a way to have 124px of space inline in HTML (preferably without using images), or another way to center the pictures in the li items?

    Read the article

  • Horizontal scroll in rich:panel to default right to left

    - by TaylorSmolik
    I have a rich:panel with a style="overflow: scroll" tag inside. By default, the scroll slides left to right. I am constantly adding a new dataTable to a dataGrid with the click of a button and I want the user to always see the most recent one, and since I have it set up so that each dataTable is added as a column to the dataGrid, the most recent one will always be on the right side of the dataGrid. Is there a way I can default the scroll to go right to left? Or maybe creating the columns from right to left?

    Read the article

  • Divs: Equal Horizontal Spacing

    - by Vecta
    I'm creating a site that has a series of four images on the homepage used as navigation with a large image beneath. <div style="width: 696px"> <div class="imglink"></div> <div class="imglink"></div> <div class="imglink"></div> <div class="imglink"></div> </div> <div style="width:696px"> ... </div> The "imglink" divs are 160px wide. I would like the images in the top div to be horizontally spaced evenly inside the div, with the two outer divs flush with the edges of the image below. I've been trying out floats, margins, padding, etc for a couple hours now and can't figure it out. Thanks for your help!

    Read the article

  • Synchronizing scroll positions for 2 WPF DataGrids

    - by Philipp Schmid
    I am trying to synchronize the horizontal scroll position of 2 WPF DataGrid controls. I am subscribing to the ScrollChanged event of the first DataGrid: <toolkit:DataGrid x:Name="SourceGrid" ScrollViewer.ScrollChanged="SourceGrid_ScrollChanged"> I have a second DataGrid: <toolkit:DataGrid x:Name="TargetGrid"> In the event handler I was attempting to use the IScrollInfo.SetHorizontalOffset, but alas, DataGrid doesn't expose IScrollInfo: private void SourceGrid_ScrollChanged(object sender, ScrollChangedEventArgs e) { ((IScrollInfo)TargetGrid).SetHorizontalOffset(e.HorizontalOffset); // cast to IScrollInfo fails } Is there another way to accomplish this? Or is there another element on TargetGrid that exposes the necessary IScrollInfo to achieve the synchronization of the scroll positions? BTW, I am using frozen columns, so I cannot wrap both DataGrid controls with ScrollViewers.

    Read the article

  • Android Layout: Display as much ImageViews as possible without scrolling

    - by Toni4780
    I am working on an app which should display several same size images on the screen. But it should only display only so much images as possible without offering scrolling. E.g. On a "big" tablet it could display 10x10 Imageviews (screen is large, so there is much space for pictures) On a "big" phone there might be enough space to display 6x6 ImageViews, so it should only display a 6x6 array of images. On a small phone there is propably only space for 4x4 ImageViews, so it should only display this. How can I make this in Android? I know about "layout-large", ... but if i make a special fixed xml-layout for a "large" device, it would not fit all devices correct. E.g. a Galaxy Nexus is a "normal" device and so is a Nexus One, but there would be at least be space for one or two more imageview rows on a Galaxy Nexus than on a Nexus One. So do I have to measure in code somehow how big the resolution is and display some TableRows accordingly? Or is there a special way how I can manage this?

    Read the article

  • jQuery ui datepicker positioning problem when scrolling down webpage

    - by Remnant
    I have a webpage that uses multiple instances of the jQuery ui datepicker. My webpage will display ~80 records which extends beyond a single screenshot. <% foreach (var record in Model) { %> <div class="recordname"><%=record.name%></div> <%=Html.TextBox("DateTimePicker", null, new { @class = "date-pick" } )%> // <-- additional html here --> <% } %> I have set the defaults of my datepicker as follows: $(".date-pick").each(function() { $(this).datepicker({ dateFormat: 'dd M yy', showOn: 'button', buttonImage: '/Images/datepickericon.png', buttonImageOnly: true }); }); When the page first loads, if I click any datepicker icon that is visible on screen (i.e. without scrolling) then the datepicker appears as expected. However, if I scroll down the page and then click a datepicker icon, the datepicker does not appear in the screen window but is instead rendered right back near the top of the screen. Any ideas how to solve this? I am using: IE7 asp.net mvc jquery.ui.datepicker.js (UI/API/1.8/Datepicker)

    Read the article

  • How to implement JQuery easing into this window scroll movement function?

    - by Mohammad
    With this code I've been able to capture the mousewheel movement and apply it to the horizontal scroll bars instead of the vertical default. $('html').bind('mousewheel', function(event, delta) { window.parent.scrollBy(-120 * delta, 0); return false; }); Is there any way that I could add this jQuery easing animation to the scroll movement? jQuery.extend( jQuery.easing, { easeInOutBack: function (x, t, b, c, d, s) { if (s == undefined) s = 1.70158; if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b; return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b; } }); Thank you so much in advance!

    Read the article

  • How to hide the vertical scroll bar in a .NET ListView Control in Details mode

    - by Adam Haile
    I've got a ListView control in Details mode with a single column. It's on a form that is meant to only be used with the keyboard, mostly with the up/down arrows for scrolling and enter to select. So I don't really need to have the scroll bars and would just like them to not show for a cleaner look. However, when I set the ListView.Scrollable property to false, I can still move the selected item up and down, but as soon as it moves to an item not currently in view, the list won't move to show that item. I've tried using EnsureVisible to programmatically scroll the list, but it does nothing when in this mode. Is there any way to manually move the list up and down to scroll, but without having the scrollbar present?

    Read the article

  • iPhone: Having trouble figuring out how to scroll a UITableView with custom UITextField cells automa

    - by Gordon Fontenot
    Ok, I know this seems like a duplicate question, but don't think it is. I actually have this implemented already (thanks to this SO question), but it seems sluggish. I am willing to tweak it a bit, but I ran across a demo app by AboutObjects that seems to have exactly the right functionality with absolutely no code doing it. I have looked through their demo code dozens of times, and I can't figure out what they are doing that I am not. The code to look at is in their iPhone Development Tutorials section, and is called "Editable TableView" (2nd from the bottom). There are a couple of questions on the forums on that site asking how they got the functionality, but there is no answer (other than "It's a built in function"). Does anyone have any clue as to why their UITableView would implement the input scrolling by default (including being able to scroll the view manually when the keyboard pops up, which I cannot get to work)?

    Read the article

  • How to get CEdit to scroll properly?

    - by CSharperWithJava
    I have a CEdit control that's used to display a diagnostics output. Sometimes the data overflows the screen size, so naturally I set the Vertical Scroll property to true (MFC dialog editor). But then, when I tried to scroll the text that was in the window before isn't cleared and the new text is written over it. The result is a big mess of everything I have scrolled past. I've looked for a draw background property or something similar that will erase everything in the window while scrolling (before redrawing the new data). Any suggestions?

    Read the article

  • Flex List ItemRenderer with image looses BitmapData when scrolling

    - by Dominik
    Hi i have a mx:List with a DataProvider. This data Provider is a ArrayCollection if FotoItems public class FotoItem extends EventDispatcher { [Bindable] public var data:Bitmap; [Bindable] public var id:int; [Bindable] public var duration:Number; public function FotoItem(data:Bitmap, id:int, duration:Number, target:IEventDispatcher=null) { super(target); this.data = data; this.id = id; this.duration = duration; } } my itemRenderer looks like this: <?xml version="1.0" encoding="utf-8"?> <mx:VBox xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" > <fx:Script> <![CDATA[ import mx.collections.ArrayCollection; ]]> </fx:Script> <s:Label text="index"/> <mx:Image source="{data.data}" maxHeight="100" maxWidth="100"/> <s:Label text="Duration: {data.duration}ms"/> <s:Label text="ID: {data.id}"/> </mx:VBox> Now when i am scrolling then all images that leave the screen disappear :( When i take a look at the arrayCollection every item's BitmapData is null. Why is this the case?

    Read the article

  • Signal "0" error while scrolling a tableview with images

    - by Amitkumar
    Hi, I have a problem while scrolling images on tableview. I am getting a Signal "0" error. I think it is due to some memory issues but I am not able to find out the exact error. The code is as follows, - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; UITableViewCell *cell = [travelSummeryPhotosTable dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier]autorelease]; } //Photo ImageView UIImageView *photoTag = [[UIImageView alloc] initWithFrame:CGRectMake(5.0, 5.0, 85.0, 85.0)]; NSString *rowPath =[[imagePathsDictionary valueForKey:[summaryTableViewDataArray objectAtIndex:indexPath.section]] objectAtIndex:indexPath.row]; photoTag.image = [UIImage imageWithContentsOfFile:rowPath]; [cell.contentView addSubview:photoTag]; [photoTag release]; // Image Caption UILabel *labelImageCaption = [[UILabel alloc] initWithFrame:CGRectMake(110.0, 15.0, 190.0, 50.0)]; labelImageCaption.textAlignment = UITextAlignmentLeft; NSString *imageCaptionText =[ [imageCaptionsDictionary valueForKey:[summaryTableViewDataArray objectAtIndex:indexPath.section]] objectAtIndex:indexPath.row]; labelImageCaption.text = imageCaptionText; [cell.contentView addSubview:labelImageCaption]; [labelImageCaption release]; return cell; } Thanks in advance.

    Read the article

  • jQuery: detecting reaching bottom of scroll doesn't work, only detects the top! :(

    - by Jack Webb-Heller
    Hi folks! So basically my problem is a seemingly simple one. You can see it in action at http://furnace.howcode.com (please note that data is returned via Ajax, so if nothing happens give it a few moments!). What's MEANT to happen, is in the second column when you reach the bottom of scrolling, the next 5 results are returned. But what actually happens is it only returns the 5 results when you hit the TOP of the scroll area. Try it: scroll down, nothing happens. Scroll back up to the top, the results are returned. What's going wrong? Here's my code I'm using: $('#col2').scroll(function(){ if ($('#col2').scrollTop() == $('#col2').height() - $('#col2').height()){ loadMore(); } }); loadMore(); is the function that gets the data and appends it. So what's going wrong here? Thanks for your help! Jack

    Read the article

  • GDI fast scroll

    - by genesys
    Hi! I use GDI to create some custom textwidget. I draw directly to the screen, unbuffered. now i'd like to implement some fast scrolling, that simply pixelshifts the respective part of the framebuffer (and only redraws the newly visible lines). I noticed that for example the rich text controls does it like this. If i use some GDI drawing functions to directly draw to the framebuffer, over a rich text control, and then scroll the rich text, it will also scroll my drawing along with the text. so i assume the rich text simply pixelshifts it's part of the framebuffer. I'd like to do the same, but don't know how to do so. Can someone help? (independant of programming language)) thanks!

    Read the article

  • How to retarget the scroll wheel in VB.Net?

    - by Orborde
    I have a form in VB.Net with Autoscroll enabled and several ComboBoxes within it. When I click on a ComboBox, I can use the mouse wheel to scroll through options, but I cannot deselect the ComboBox (by clicking off it on a blank portion of the parent form) in order to return to scrolling the parent form. This makes navigation in the form annoying, as I instinctively click off the control and flip the scroll wheel, causing the ComboBox to change selections instead of moving the parent form. Is there a way to make this work in the intuitive way I expect it to, or do I have some conceptual confusion that makes this the wrong question to ask?

    Read the article

  • liquid CSS issues - rtl, floating and scrollers

    - by Rani
    hi I want to build a site that will have these restrictions: RTL direction vertical scroll on the right side whole page is floating to the right page has 2 columns the right (main) column has min width the right (main) column has table inside it that can expend in its data and get wider making all other data in the column expend to the same width as well the sidebar should be on the left side but still floating to the right of the main div it should fit low resolution so the page will be able to add horizontal scroll if needed should work in all major browsers don't use table for constructing the page Can someone help or direct me? Thanks Rani

    Read the article

  • How to make speed of scrolling more slower in this jQuery scrolling script?

    - by Jitendra Vyas
    Currently in example speed and step both are are 1. but i need much slower speed of scrolling. How to get full control over speed. I want the clouds to move much slower Example http://jsfiddle.net/cHZG6/1/ Code (function($) { $.fn.scrollingBackground = function(options) { // settings and defaults. var settings = options || {}; var speed = settings.speed || 1; var step = settings.step || 1; var direction = settings.direction || 'rtl'; var animStep; // build up a string to pass to animate: if (direction === 'rtl') { animStep = "-=" + step + "px"; } else if (direction === 'ltr') { animStep = '+=' + step + "px"; } var element = this; // perform the animation forever: var animate = function() { element.animate({ backgroundPosition: animStep + " 0px" }, speed, animate); }; animate(); }; })(jQuery); $("#header").scrollingBackground({ speed: 1, step: 1, direction: 'ltr' }); $("#header-2").scrollingBackground({ speed: 1, step: 1, direction: 'rtl' });

    Read the article

  • JTextArea - Highlight Text While Scrolling Up or Down

    - by Sujay
    I'm trying to work with a non-editable JTextArea added to a JScrollPane. I want a line to be highlighted when the user clicks on that specific line. I could implement this part using the following code: public static void initHighlightOption(final JTextArea textArea){ textArea.setFont(new Font("Courier New", Font.PLAIN, 12)); textArea.setEditable(false); final Action selectLine = getAction(textArea, DefaultEditorKit.selectLineAction); textArea.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { if (SwingUtilities.isLeftMouseButton(e) && e.getClickCount() == 1) { selectLine.actionPerformed(null); } }); textArea.setSelectionStart(0); textArea.setSelectionEnd(0); } public static Action getAction(JTextArea textArea, String name) { Action action = null; Action[] actions = textArea.getActions(); for (int i = 0; i < actions.length; i++) { if (name.equals(actions[i].getValue(Action.NAME).toString())) { action = actions[i]; break; } } return action; } What I want to add is that once a line is highlighted and user scrolls up/down using keyboard up/down key, i want the current line to be highlighted. Is this possible by adding a keyListener? I'm stuck on how highlight data while scrolling up. The text area contains data like this: Line1 Line2 Line3 Line4 Line5 (i.e. there might be new lines between two particular lines of data)

    Read the article

  • How to make an scrollable UITextField Inside UItableViewCell?

    - by user333624
    Hello everyone. I created a bunch of editable UITableViewCell by embedding an UITextField inside, but I have seen some apps that allows you to scroll the UItableview by scrolling inside an inactive editable cell. How can I do that? And how can I also dismiss the keyboard when tapping somewhere else? I know about the method: - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event { UITouch *touch = [[event allTouches] anyObject]; if (touch.tapCount == 1) { [self resignFirstResponder]; } else { }} I put it inside my custom table view controller but the method doesn't seem to be called upon a tap, and I don't know if even if it gets called will dismiss the keyboard. Any help will be appreciated.

    Read the article

< Previous Page | 16 17 18 19 20 21 22 23 24 25 26 27  | Next Page >