FAQ Database Discussion Community


Simple jq slider via position

javascript,jquery,position
guys! I have a problem with a simple js for simple slider. It works with position left: -=999px; my js change class for button to make it unactive, but button still works. where i miss? I need to disable the button ive click. $(function(){ var slideWidth = $('#slider ul li').width();...

Wrap one right-floated element underneath another

html,css,position,divider
I'm trying to put 2 divs beneath each other like this: div 1 div 2 This is how far i've gotten in the HTML-file: <div width="100%" z-index:"1"> <div id="username-full"> <div id="username-form"> <input type="text" name="username" id="username-input" placeholder="Username" /> </div> <div id="username-text"> <p>Username:</p> </div> </div> </div> <div width="100%" z-index:"1"> <div id="passwd-full"> <div...

How to completely center something [duplicate]

html,css,position
This question already has an answer here: Horizontally center a div in a div 40 answers All I want to do is center a paragraph completely in the middle of the page and so that it stays centered when the browser is minimized etc....

FullPage.js: issues in div positioning

javascript,html,css,position,fullpage.js
I'm using FullPage.js ( for the official documentation here ) I need to have in a slide (a #section , as called in the .js ) 4 boxes stacked 2 by 2 that occupy all the slide, with a little margin around the slide (like in the scheme I made)....

How can I align icons with their titles?

html,css,position,alignment
As you can see from this screenshot, My icons aren't aligned with their titles. They are written as two unordered lists. The only solution I have right now is to give individual margin-left to each of the icons, but I'm hoping there is a better way to do it. Any...

Unity3D: Adding charged force in relation to position

c#,unity3d,position,transform
I am trying to make a game which "kind of" simulates the shooting of the "worms" game. The player can choose the position (circular) of an object and then, the force that is applied to the object should move in the direction its pointing towards. I tried using the AddForce(transform.right)...

Trying to get just “x” coordinate from pos() method python

python,position,mouseevent,pyqt4
I'm currently having an issue getting just the x position of the cursor so I can place a marker on that x and y location. I'm using QGraphicsScene and view to create this circle object at the location of the mouse when the mouse is clicked. Since the QGraphicsEllipseItem takes...

how to avoid horizontal scroll caused by absolute positioned div

html,css,position,scrollbar
I am using animate.css to add some animations to a wesite. Some animations like "fadeInLeft/Right" or "bounceInLeft/Right" make the horizonatl scroll to appear. This has easy fix, adding overflow-x:hidden to the parents. But now I have an absolute positioned button, placed to be in the middle of two parents divs....

Unity3D: Moving a child to orbit a parent

c#,unity3d,position,transform
I have made a game where I make two spheres, one child sphere and one parent sphere. The parent sphere is bigger than the child sphere, and I am trying to make the child move around the parent sphere. In the following code, the child sphere moves in a circle....

Positioning element in the middle of dinamicaly sized element

css,position,centering
I have to put "Play" icon and text "Play" in the center of element that contains and its height and width depend of that image - they are changing depending of the user's screen. I was trying to use it like this a.thumbnail:hover:after { content: "Play"; width: 50px; height: 20px;...

Vertical Align (line-height method) not working

html,css,position,alignment
My code in my HTML file is as follows: #firstblock h1 { font-family:'Open Sans'; font-size: 12vh; text-align: center; } #firstblock { position: relative; height: 200px; line-height: 200px; } <div id="firstblock"> <div id="title"> <h1>TITLE</h1> </div> </div> I see no reason why the vertical align is not working. I would appreciate any...

Positioning issues with display block

html,css,position,block
I have my navigation set to display: block; and my paragraph set to display: block; however my paragraph section sits at the top of the page covering the navigation. I have the css for my navigation and I would have thought it should push other objects away? nav { display:...

Get the number of an element's pixels which are inside the viewport

javascript,html,dom,position,viewport
I'm trying to get the total number of a given html element's pixels which are visible inside the viewport. This question and accepted answer Can I detect the user viewable area on the browser? were very useful for determining whether the element is in view/out of view/partially in view, but...

R - gsub a specific character of a specific position

regex,r,position,gsub
I would like to delete the last character of a variable. I was wondering if it is possible to select the position with gsub and delete the character at this particular position. In this example, I want to delete the last digit in the end, after the E, for my...

How can I show the title in front of logo not under it in Shiny R

html,css,r,position,shiny
So the following code writes the title under logo while I want it to be in front of the logo. In titlePanel help in RStudio there's no help regarding positioning the title. Any hack for this? shinyUI(fluidPage( list(tags$head(HTML('<img src="http://ic.pics.livejournal.com/oddharmonic/554743/66688/66688_600.gif" border="0" style="border:2px width="10" height="10" alt="Photo of Milford Sound in New Zealand!"...

Windows Forms Chart: Get mouse cursor coordinates in Chart axis scale?

winforms,charts,onclick,position,coordinates
I have a problem with the following sample: When I click at the place marked as '1' on my screenshot, I can get position in pixels by MouseClick event in a pretty easy way: private: System::Void chart1_MouseClick(System::Object^ sender, System::Windows::Forms::MouseEventArgs^ e) { Point chartLocationOnForm = chart1->FindForm()->PointToClient(chart1->Parent->PointToScreen(chart1->Location)); cursorPosX = e->X - chartLocationOnForm.X;...

Footer won't stay in the bottom of the page

html,css,position,footer
I'm am having some trouble, trying to get my footer to stay at the bottom of my page and the only tutorials I can find has a fixed position, which I dont want it to. I just want the footer to stay at the bottom of the page, so if...

Move ball up and right

jquery,html,position
My previous program bounces a ball but now I want the user to be able to move it up and down, left and right whenever they want. So far my right and down buttons work but the logic for my left and up don't. In my mind, the following code...

How would I fix everything on my webpage to appear the same size on diffrerent sized screens? [closed]

html,css,html5,position,size
I'm trying to create a webpage in HTML5 using Notepad++. When I open the page on my laptop it all fits the page well, I have thin red bars as images going across the page, which all fit the screen perfect. However when I open the image on my computer...

In JointJS, how an element accesses position, inPorts, outPorts?

javascript,position,jointjs
I am using jointJS for my academic project, I have such a question, How an element accesses position, inPorts, outPorts? For example, we create an element like this, var m1 = new joint.shapes.devs.Model({ position: { x: 50, y: 50 }, size: { width: 90, height: 90 }, inPorts: ['in1','in2'], outPorts:...

space between bottom and fixed ul

css,position,html-lists,margin,fixed
I want my nav bar to be fixed at the bottom of the screen. Now, however, there is some space between the nav bar (ul) and the bottom of the screen. Only margin-bottom: -1% seems to work but I would like to fix it without that or at least understand...

Find rotated div top position from left

javascript,jquery,html,rotation,position
I want find top position of rotated div from element.can any one help me. i can able find top position of element but I want top(Y pos) position from left(x) position. I am used this var degree = degree; if (degree < 0) { var sign = -1; } else...

Tree traversal - inorder position

java,algorithm,tree,position,traversal
I am trying to find the value of the kth node in tree, using recursive in order traversal. The code below is done with recursion, but my implementation is way too slow. Can someone please give me a hint how to make it faster? (reihe and pos are class variables,...

Vuforia on Android mirrors target position after orientation change

android,position,orientation,target,vuforia
I used VideoPlayback as the base of my application. I use SCREEN_ORIENTATION_SENSOR_LANDSCAPE on both vuforiaAppSession.initAR and activity orientation. If I start my application as landscape_left, it works fine, if I start it as landscape_right, it also works fine, but if on runtime I change the orientation, the positioning of the...

Wicket ModalWindow - fixed vertical (start) position

position,wicket,modal-window
I'm using a wicket application inside an Iframe. This causes a problem in the Internet Explorer. The ModalWindow opens not at the middle of the screen (of the current viewport). It opens at the bottom of the screen and nearly outside of it. I only want it to open some...

Align text on top, right, bottom and left of image?

css,position
I'm trying to add text on all four sides of image but i cant get the right text to align properly. The right text is still on left side. FIDDLE: https://jsfiddle.net/y75L0ww9/ <span class="top">Text on top</span> <span class="left">Text on left side</span> <img src="http://www.uaa.alaska.edu/web/images/horizontal-large.jpg" /> <span class="right">Text on right side</span> <span class="bottom">Text...

LWJGL Player Health bar not positioning properly

java,opengl,position,lwjgl
I'm making a game in Java using LWJGL and slick_util recently I'm trying to implement a health bar that will hover on top of the player's head. Problem is, it is not positioning correctly. The health bar's bottom left corner(from where OpenGL starts drawing) always appears at the top right...

Cannot position a dialog at the center of the view

android,dialog,position,center
I want to put a custom dialog at the center point of a specific layout. However the dialog does not go to the center. actually i tried various ways however now i am stuck... such a headache. I tried like the code below. showCustomDialog(){ View view = (View) getLayoutInflater().inflate(R.layout.abc, null);...

Getting Elements positioned correctly

html,css,position,css-position,z-index
I have beat my head on this for over an hour and I need your help, I am creating a web form and I am having the most difficult time getting these shadow elements pushed behind the form and not the container. I have tried giving the .form class div...

Center div in middle of other two divs in CSS

html,css,position,vertical-alignment
So, I have this example of how my three divs are suppose to be. I've been playing around with the position:relative in the container and then position:absolute in the three children divs. The thing is I feel like its not the best approach. What do you guys think? This...

CSS make colours go off to sides

html,css,position
Bit of a vague title, but I wasn't sure of how best to describe it. I've created a fiddle (https://jsfiddle.net/h87k8146/) of two divs within a wrapper. So what I want to achieve is have all content remain within the wrapper, but with the background of .left and .right stretching out...

How to get the offset position for each element of class name?

javascript,html,class,position,offset
How can I get the top offset position for each element using classname? I need to return a value for each class named .Me (Can't use jQuery this time) This is how I am trying to do it: var list = document.querySelectorAll('.Me'); for (var i = 0; i < list.length;...

Sticky Position: Header scrolled away after a while

html,css,scroll,position,sticky
On my website I have made the <nav> stick to the top, but it only sticks a few seconds / pixels when I scroll down, then it gets scrolled away, please see the code snippet below and scroll down. I want the nav to stick to the top any time...

Saving Sprite Position

java,libgdx,position,sprite
I have a sprite that when reaches a certain position it gets removed: if(sprite.getY()>=700){ enemyIterator.remove(); Pools.free(sprite); } I wan't to save the last position of the sprite before it gets removed,I tried sprite.getX() and sprite.getY() but those are only usable while the sprite is in the game....

Where and how to put a progressbar on a existing layout?

android,xml,position,progress-bar,center
i created an activity that includes an AsyncTask for fetching json from internet. I add a progressbar to the existing layout so users can't interact with EditText till up the data download is completed. WHERE to put the progressbar widget on existing layout? HOW to make users not to click...

C# programmatically position panel to fill one third of the parent form (WinForm)

c#,winforms,layout,position
I have a form with a Panel and a RichTextBox. The Panel is Dock.Top and the RTB is Dock.Bottom. After initialization. I wish to position the panel so it takes up the top 1/3 of the form with the RTB taking up the remaining bottom of the form. However, the...

How can I get text to appear only in a div 'window' while scrolling by?

css,position,fixed
I have a long page of content. Within this content is a div. When this div scrolls by, I'd like text to appear... as if the div is a window and you are seeing the text outside. The text remains fixed as the div scrolls by. Take a look at...

Absolute & relative content is displayed differently

css,position
My question is: If I'm in a situation where relative and absolute positioning should have the same result (for example, if I apply this position on a div element which is the only element in the page), and that I set a specific width to my element, why is the...

How to set Dialog text position from code?

dialog,position,axapta,x++,dynamics-ax-2012
Good day all, I have a simple Dialog started after click button, I post my code: Dialog dialog; super(); dialog = new Dialog("Dialog example"); dialog.addText(strFmt("Text to show")); dialog.addText(strfmt("SecondText to show")); dialog.run(); I will show a Dialog window loollike this : It's possible to set the position from code the Text:...

Stretch a block element to fill 100% vertical scroll height of its parent element

html,css,layout,position,css-position
I have a layout with a vertical scroll. One of the child elements within the scrollable div is absolutely positioned with a large top value, inducing a vertical scrollbar on the parent. The scrollable parent div also has some child div elements (lets call them pillars) positioned horizontally adjacent to...

JQuery UI Position is different if executed on same element more than once

jquery,jquery-ui,position
I am using the JQuery UI position function to move a div out of hidding and into another div on the screen. This works. $("#b"+num).position({ my: 'left top', at: parent.data('pos'),//parent is set dynamicaly $('#some_div') of: parent, collision: 'none' }).show('fast'); I have another button that hides the positioned div And yet...

jQuery get current view position from top

javascript,jquery,html,position
I wish to check if my current element is in view or not. I use this condition to check that: if ($(window).scrollTop() > $('.element').offset().top) { //show } But problem is that $(window).scrollTop() is giving different results on different browser height (I'm using FireFox, first number is .scrollTop(), second - .offset().top):...

Positioning a div using JQuery

javascript,jquery,html,css,position
I have a div that I want to position relative to the mouse when hovering a span element. This code is here and it does not seem to work. The div is only displaying. var x; var y; $(document).mousemove(function(event) { x = event.pageX; y = event.pageY; }); $('#sp').hover(function() { document.getElementById('sp_info').style.display='';...

Z-Index With Position: Relative

html,css,position,z-index
I am trying to transfer a mobile app design into a website. I need to keep some elements in the same place over different resolution screens and window sizes. I am using relative positioning for all my positioning but I can't seem to get the elements to overlap using Z-Index....

Better way to put several shapes in the right places

css,position,css-position
I was trying to make a crystal bar by using CSS. Here is a JS Bin The 3 shapes would be misplaced according to the different resolution of display. I've met so many times of putting shapes in the right places. Is there a better way to manipulate the place...

How do I position a div under a fixed position div

html,css,position
I have a position:fixed div at the top of my page, so that when a user scrolls down the menu always stays at the top. How do I position another div element underneath the fixed div. I'm using CSS and HTML I'm using a smooth scrolling jQuery and need each...

Identify and add HTML class to masonry items by their position

javascript,jquery,position,addclass,masonry
I am using Masonry to render a group of items in two columns. Given below is the HTML structure. <div id="grid"> <article class="entry"> … </article> <article class="entry"> … </article> <article class="entry"> … </article> <!-- And so it goes --> </div> What I want to achieve is identify which one of...

Allowing parent div to resize when child element is getting bigger

html,css,position
I have a div containing a table , which are centered: <div class="parent"> <table class="child"> </table> </div> CSS: .parent{ position: absolute; width:300px; height:200px; top:50%; left:50%; margin:-100px 0 0 -150px; background: #fff; border: 1px solid #fff; border-radius: 5px ; -moz-border-radius: 5px ; -webkit-border-radius: 5px ; display:inline-block; text-align:center; } In case the...

Unity mouse position to world position but just the Y pos

unity3d,position,mouse
Hello I am making a small game in the Unity game engine and now I cant get it done just to get the y position of my mouse to be converted to the world y position. Any ideas to solve this?(Programming in c#)

change custom product tab position in admin grid Magento

magento,tabs,position,admin,product
Hi i have added a new product tab in admin grid by following the below link http://inchoo.net/magento/how-to-add-custom-product-relations-in-magento/ Everything is working fine. BUt this has added the new tab at the last position in product edit section. Can you please suggest me how can i change the position of that tab....

How to correctly position a “X” in a rectangle?

c#,position,draw,square
I have the next problem: I have rectangle with 10 lines and 10 columns. When I press on a square I have to draw the "X" letter. Well, when I press on the right half, or on bottom half of the square, the "X" is drawn in the next right...

VB.NET Form Position to Bottom

vb.net,winforms,position
It may be a stupid question...but how can I make a Windows Form to load from the Bottom of the screen in VB.NET? I have tried using Form Location but it only have Center Screen ETC. :( Also tried this code...but not exactly what I would like.. Dim x As...

Angular JS - View Scrolling Issue *CSS*

css,angularjs,position
So my problem is that I have set my view to be width & height 100%; which works well but once some of the content within the view causes a scrollbar to appear it scrolls into whitespace. As if the view's overflow is hidden but the content is still making...

jQuery UI slider labels - follow handles on resize

jquery,jquery-ui,slider,position
I'm using labels to display handle values with jQuery UI slider. How can I maintain the position of these values on resize? Here's a fiddle: http://jsfiddle.net/kirkbross/vc8tumg9/3/ $(label).html(hours + ':' + minutes).position({ my: 'top center', at: 'bottom center', of: ui.handle, offset: "0, 30" }); For extra credit... can you tell me...

Android TouchEvent ACTION_DOWN and ACTION_MOVE havesame position the first x Steps

android,position,box2d,andengine,ontouchlistener
I have a problem using the touchEvents of Android (Andengine). I noticed the problem by building a Body, which I can rotate by touching it and move the finger. Thats all working. I touch the Object, the pScenTouchEvent gives me one position (x,y) on ACTION_DOWN. Then I move my finger...

Return the position clicked in recyclerview in a different Activity?

android,onclick,position,recyclerview
I have a recylcerview in a navigation drawer and I wish to find what position was clicked by the user in the recyclerview in a different activity. The way I have written the code currently always return 0 as the position. Can anyone help me out. Thanks in advance! Recyclerview...

td positioning within tr

html,css,position,css-position
I have a table which has multiple <td> elements. I need the elements to be part of the <tr> but a split on 2 lines: Example: <tr> <td>1</td><td>2</td><td>3</td><td>3</td> <td>5</td> </tr> The goal I want to achieve is that 1,2,3 and 4 are on one line and 5 will be under...

CSS Positioned Absolute Element, automatic width outside of parent's bounds?

html,css,css3,position
So, I have my parent element positioned relative, in order to allow a tooltip element to be positioned absolute inside, at the top of it. I am aware that you are required to add "left: 0, right: 0", so that the width of the element is still able to be...

CSS bring img to front

html,css,position
Im having some trouble getting an image back to the front. So basically this is my code segment: <itemimg> <a href="images/table1.jpg" data-lightbox="table1" data-title="Rustic Green Table"><img src="images/table1.jpg" /></a> <a href="images/table1-side.jpg" data-lightbox="table1" data-title="Rustic Green Table"><img src="images/table1-side.jpg"></a> </itemimg> The second a href which links table1-side.jpg is overlapping thetable1.jpgbut i want it the other...

Set the rotation and position of bitmap

java,android,matrix,position,surfaceview
I would like to know how i both can change the position of a bitmap and at the same time rotate it. Im drawing at a canvas. Im currently using this line of code: canvas.drawBitmap(bitmap, posX, posY, paint); and I think using a matrix for rotation is the best option?...

Draw a line every N words using iTextSharp

position,itextsharp,line,word,draw
Using iTextSharp, I create a pdf writing some text into it. What I need is to draw a line to delimiter the text every 25 words, like the following image: Basically, I need to do that: draw a line every 25 words, just like the image. I'm aware there's a...

How would I convert an argument into a string in bash

arrays,string,bash,position
When I run the script I enter a single argument. I want to store the argument into a variable and access it as a string. So if I enter $ ./script foo I should be able to access f, o, and o. So echo $pass[0] should display f but what...

Magnific Popup position bug

google-chrome,firefox,position,magnific-popup
There is a strange bug happening when you have got a link triggering Magnific Popup and that link is contained inside an absolute positioned element, which is positioned inside a relative positioned element with overflow:hidden. To reproduce the bug, checkout this example in Chrome or Firefox: http://codepen.io/mediadivisiongmbh/pen/bdRjKy HTML <div class="hover-container">...

How to make Google Chrome and iOS remember scroll position in div after returning back?

css,browser,scroll,position,back
The problem is that the scroll container is a div, not body. And that causes Google Chrome and iOS to fail to remember scroll position of the div after users go to another page and then return back. The related CSS code is as follows. The scroll container is #container....

“position:fixed” Not Working For Header Menu

css,menu,position,fixed
No matter what, the header menu will not stick to the top of the screen. I have a suspicion it may be something to do with the surrounding html structure - it's quite complex due to a mobile menu (resize to activate) position: fixed; top: 0; left: 0; ****link removed****...

Raycast without using a collider

unity3d,position,raycasting,voxel
I am doing a Voxel game and my engine was using Physics.raycasts and Mesh colliders for getting the coordinates of the block you clicked on until now. I decided to remove the mesh collider, because it was just eating too much performance in some situations and I got fps dropdowns...

IOS draggable objects not saving position

ios,position,uigesturerecognizer
I currently have a view which contains a number of buttons and a single text field. The users can drag the buttons around, and when finished, interact with the text field. Dragging the buttons using UIPanGestureRecognizer seems to work, however once a user interacts with the text field, all of...

shrinking tr width when it get position fix

javascript,html,css,position
I have a table of data which cols is determined automatically with its data. but I need to fix first row as header title "for scrolling it remains fix at the top". when I give it position:fixed , header row`s width shrinks comparing to others!!! first pic before setting position:fixed...

List a specific position in each list within a list (python)

python,list,python-3.x,matrix,position
Is there a way to select every 2nd or 3rd (for example) item within a matrix? For example: f = [["1", "5", "8", "9"], ["2", "6", "9", "10"], ["3", "7", "11", "12"]] I am wondering if there is a direct function to select every 2nd number in every list (preferably...

How do I force jquery terminal to remain the same size?

jquery,scroll,terminal,position,jquery-terminal
I am using Jquery terminal and it seems pretty cool. I've been looking around for several hours now, and I can't find a way to get the console to remain stationary when text is inputted. Instead, the console increases in size for every line of input that I enter. Does...

Center number with 1 and 2 digit

html,css,position
I have a shape which is a heart and I have a number inside. The problem is that I can have a number with 1 digit and a number with 2 digit and I am not able to center them into the heart. https://jsfiddle.net/b7ggddqy/ .description{ position:relative; height:100px; } .heart{ z-index:-500;...

How to position a button using grid row and column definitions?

xaml,button,grid,position,windows-phone-8.1
I've set up a Windows Phone 8.1 project and right now I'm trying to place a button, in the centered horizontally near the bottom of the layout. So far I've figured out the following to center the button on the layout, but the Grid.Row setting doesn't seem to have any...

In css, how do I position a list of images, so that each one is right and down of it's previous sibling?

html,css,position
I have the following mockup html: <img /> <img /> <img /> <img /> I want each image positioned 10px down, and 10px to the right of it's previous image. It needs to look like the Result in https://jsfiddle.net/f0c429sq/1/. I managed to get the correct result in that jsfiddle link...

CSS3 animation div position cause unclickable area and not trigger the animation

html,css,css3,animation,position
I have tried to do an hover animation which brings the info from bottom to center, the problem is that the div position point starts too much from the bootom and it cause that the top and center area don't trigger the hover animation, only the bottom area triggered it....

How to move this div left based on updated x position value?

javascript,css,position
http://codepen.io/leongaban/pen/WvOmwL This should be pretty simple, trying the answer found here to no avail. d.style.left = x_pos+'px'; I have a div #carousel-list I want to move left and right based on the < > nav buttons. Current javascript: document.getElementById('move-right').addEventListener("click", moveRight, false); var carousel = document.getElementById("carousel-list"); function getPosX(el) { // yay...

How to stop element moving when its border-radius changes?

html,css,position,size,border
So I've just got this small extract of code which I want to go ahead and add some more effects too. At the moment though, the problem I'm having is that when the border-radius changes (from 0 to 5px), then the image jumps down and to the right, so not...

EnumerateChildNodesWithName, Can't seem to Remove nodes

swift,position,nodes,enumerate
I'm trying to remove some nodes from a parent node once they reach a certain x position. The problem I have is that the parent node is changing x position, but the children are not changing x position inside the parent (but are obviously moving with the parent), so when...

How can I position one div to the right of two others?

html,css,position
I'm trying to position three elements inside a div and I'm having some trouble. Two of these elements need to be stacked to the left and one floated to the right. Placing #three above the other content and floating it to the right allows it to appear in the correct...

How to set 100% height on a sidebar div?

html,css,position,height,sidebar
I'm trying to figure out a way to display a sidebar inside a div so it will take 100% of the available height. The code is available here. HTML - http://pastebin.com/4nBe2KQS CSS - http://pastebin.com/r63bREbb I have already tried a lot of answers I found like removing the block elements, setting...

Element top margin doesn't seem to change

html,css,position,css-position
I have some text, and beneath it a button. No matter what I change the top margin to, the button still sticks to the bottom of the text. I am trying to leave a small gap between the text and the button. Here is a Jsfiddle: http://jsfiddle.net/24bk2t78/ @import url(http://fonts.googleapis.com/css?family=Nunito:300); .homethree...

Display three blocks inline CSS

html,css,position
I have three div's, #left_sidebar, #records_list and #right_sidebar, I want to display them inline, but when I using display:inline-block, all seems to be fine but sidebars placing on the bootom of page, then I try to use float, but still getting some creppy behavior, then I do this: #left_sidebar {...

How do I remove Sprites when they go on a specific position?

java,libgdx,position,sprite
My Sprite are spawned at a random time, after being spawned the the move upward until they get on a certain position then they should be removed. That's what I've been trying to do but I always get an error. //this method is called at random time public void newEnemy(){...

Cannot Centre a Div to be in the Middle of Page

html,css,position,center
I am trying to get my Div to be centered in the page, however I cannot get it to work properly. Despite using Margin-left: auto and Margin-Right:auto it still doesn't center in the middle of the page. Any help would be appreciated! HTML: <div class="OuterService"> <div class="service"> <div class="virus" style="width:250px;...

How to fillRect canvas grid cell depending on mouse position?

javascript,canvas,grid,position,mouse
I've pretty code about grid parameters depending on mouse coords. CANVAS GRID DEMO HERE I want to clear filled, selected(imoX/imoY) cell while mouse is outside the selected(imoX/imoY) cell. It should be like: onmouseover[CellNumberX] = fillRect() onmouseout[CellNumberX] = strokeRect() Any solutions ? Thanks....

ActionScript 2 - Get MovieClips' initial position and save it for each mc for later target position

loops,position,actionscript-2,movieclip,greensock
I am working on an animation in AS2 which requires that all text MovieClips (instance names starting with "txt_") will be manually placed initially on stage and I need to store their own initial placed positions (x,y) so they will be retrievable later when I want to animate them to...

css using float: right with vertical-align: middle

html,css,position
I have 2 divs (in a wrapper) that I am using to display a photograph and the title of the photograph side by side and vertical-align as middle. The issue that I am having is that when I attempt to float the photograph to the right and float the title...

Child div will not over-lap parent div with a z-index added

html,css,position,css-position
I am having issues getting my viewproductbutton to go overtop of it's parent div. I have added a z-index to the element and have tried to position it with position: relative; and position: absolute;. Nothing is getting it to position in the top right corner as I want it. Here...

Bootstrap Thumbnail Cropping and Positioning

css,twitter-bootstrap,position,overflow,crop
I'm having these 3 images with different sizes. When I display them inside 3 containers like this: @foreach (var item in Model) { <div class="avatar-container"> <img class="avatar img-thumbnail" src="@Href("~/Content/Avatars/",item.Name+".jpg")" /> </div> } This is my CSS file: div.avatar-container { display: inline-block; max-height: 50px; overflow: hidden; width: 70px; } .avatar {...

have an issue with position fixed.

css,header,position
I am currently building a web site, As I have completed the header tag, I applied position:fixed; how ever it knocks out my header and I do not know why as I have tried debugging the whole header tag within css. any help would be appreciated: $(document).ready(function(){ $('#login-trigger').click(function(){ $(this).next('#login-content').slideToggle(); $(this).toggleClass('active');...

THREE.js Migration r60 to r70: now cannot write: mesh.position = myVector3()

three.js,position,migration,mesh
I am migrating a THREE.js app from r60 to r70. Amongst other changes I notice that r60 constructs of the following form no longer work in r70. mesh.position.set(0,0,0); myVector3 = new THREE.Vector3 (100,200,300); mesh.position = myVector3; This applies to meshes, pointLights, presumably to all Object3D's but I havent tested further....

setLocation on a JButton doesn't seem to work as expected

java,swing,position,jbutton,layout-manager
Here is my shortened version of my code: JPanel card1 = new JPanel(); JLabel switch1 = new JLabel(new ImageIcon("switch1.jpg")); switch1.setLocation(TOPSWITCH, LEFTSWITCH1); JLabel switch2 = new JLabel(new ImageIcon("switch1.jpg")); switch2.setLocation(TOPSWITCH, LEFTSWITCH2); JLabel switch3 = new JLabel(new ImageIcon("switch1.jpg")); switch3.setLocation(TOPSWITCH, LEFTSWITCH3); card1.add(switch1); card1.add(switch2); card1.add(switch3); card1.setBackground(Color.BLACK); /* JButton goToRoom = new JButton("TEST"); goToRoom.setLocation(180,...

How to evenly distribute a set of list boxes over a grid?

listview,grid,position,windows-phone-8.1
I'm setting up the View for an application, but I want to distribute the 12 list views evenly over the grid container. At the moment some of the boxes are spaced unevenly in comparison with others, also I'd like to do this without using margins. I've managed to position the...

Position JavaFX Button in a specific location

button,layout,javafx,position,location
My Question is how can i position a javafx button in a specific location. All the time that i tried to do this simple code is resulting that the Button is only located in the Center of the screen and not on my desired location. (I'm using StackPane) Code: Button...

How do I change the position of this sliding text-area?

javascript,html,css,css3,position
I'm trying to add a disclaimer section to the website I'm working on. I want a tab-like button at the bottom of every page which would open up a text area. I searched codepen.io a bit and found a very simple way to do it. After removing non-relevant syntax, I...

Place an absolute element in bottom of a container with overflow: auto

html,css,position,absolute
I have a logo that should be positioned in the very bottom of a fixed container. It works OK with position: absolute; however if I add overflow-y: auto; to the fixed container and add content that doesn't fit the viewport height, my logo will stick to the bottom of the...

Moving UIButton on Y Axis

ios,objective-c,uibutton,position
I have a few UIButtons in my project, however I'd like to be able to move their position on the Y axis through code. And also, would moving the button trough code affect the auto layout / universal storyboard placement? Thanks :)...

Is it possible to position a text label in a layer?

ios,swift,position,label,layer
I add a sublayer to create pie charts in my swift code. To optimize the view for different devices, I would like to position the text labels which I put on the view in the storyboard in relation to this layer ("build a group"). Is it possible to position labels...

detect listItem from button click

android,listview,button,onclick,position
I have a listView with an adapter. Every item has two buttons, and i need to detect from which listItem the button was pressed. Here is my code: List<String> mList = new ArrayList<>(Arrays.asList(mNames)); ArrayAdapter<String> mAdapter = new ArrayAdapter<String>( getActivity(), R.layout.list_item_friends_new, R.id.friends_new_name, mList ){ @Override public View getView(int position, View convertView,...

Controlling/moving an object in a circular motion in Unity

c#,unity3d,rotation,position
Basically, I want it so I can move an object left or right, but in a circular motion, rather than a straight line. This is because the object is the child of another sphere, and I want to move the object around the sphere using the left/right arrowkey so a...

Positioning text over canvas: relative/absolute positioning? z-index?

html,css,position
I have two donut graphs using Chart.js and two div elements. I'm trying to position the divs on top of the charts, but am having no luck. Of note is that the charts are side-by-side. <div id="breakdownWrap">hi</div> <div id="scoreWrap">hello</div> <canvas id="reviewBreakdown" width="150" height="150"></canvas> &nbsp; <canvas id="reviewScore" width="150" height="150"></canvas> My understanding...