css-position

Android: Find absolute click position on the ImageView after zooming (using pinch to zoom using Matrix Layout)

岁酱吖の 提交于 2019-12-04 14:11:37
问题 I am using code found in Hello Android, 3rd Edition for Pinch to Zoom functionality. After using this the pinch to zoom works fine, but after zooming i want to get the absolute click position on the image view. Here is my code package org.example.touch; import android.app.Activity; import android.graphics.Bitmap; import android.graphics.Matrix; import android.graphics.PointF; import android.os.Bundle; import android.util.FloatMath; import android.util.Log; import android.view.MotionEvent;

DIV absolute positioning - maintain position after browser window resize

China☆狼群 提交于 2019-12-04 11:52:49
I am displaying divs with position absolute. .my_label{ list-style:none; list-style-type:none; position:absolute; top:2px; left:10px; width:20px; height:20px; background-color:#FF1021; } once I re-size the browser window, all these divs stay at same position. and they're not absolute to the parent elements anymore. I want them to stay in relation with the surrounding objects. should I use position "relative" or is there another way? (also jQuery is welcome) thanks a lot To make an element position absolutely to it's parent, the parent must be set to position:relative . For example: <div id=

The width of div with absolute position depends on its parent's width?

半腔热情 提交于 2019-12-04 11:43:14
问题 I'd like to have the width of a div with absolute position depending on its content rather than its parent. For example, <div style="position:absolute"> <div style="position:absolute"> <div style="position:absolute">Div in Div</div> </div> </div> will cause word wrap as shown in http://jsfiddle.net/ymgfN/2/ It looks like the inner div's width will depend on its parent's width, even though its position is absolute. For example, if we specify width to its parent, it will work as expected (no

Why does `position:fixed` not work when viewed in an `iframe` using an iPhone or iOS device?

孤者浪人 提交于 2019-12-04 10:13:37
问题 I've looked into stackoverflow and it seems that position:fixed in an iframe for iOS mobile devices has been an issue in the past but have yet to have an answer. Here's an example I created via jsbin: http://jsbin.com/pekeca/1/ In that example, there is a parent HTML page that uses iframe which contains another HTML page (child). Here are the things to note: When the parent HTML is viewed on any device, the navigation bar in the child HTML stays fixed. This is the intended behavior. However,

CSS : centering absolute positioned text inside relative parent

∥☆過路亽.° 提交于 2019-12-04 08:30:56
问题 How can I center absolute positioned text inside fluid relative parent? I'm trying to use text-align:center on parent elements but it always centers child's left corner, not element itself. http://jsfiddle.net/sucTG/2/ 回答1: The thing is that position:absolute; modifies the element's width to fit its content, and that text-align: center; centers the text within the element block's width. So if you add a position: absolute; don't forget to increase the width of the element, or else the text

CSS relative positioning with negative value and height

不想你离开。 提交于 2019-12-04 07:47:11
I'm trying to negative position a DIV element (in the example is #content), but my problem is the div's container (#wrapper2), gets too much height (actually is the height the #content is giving, but as I'm moving the content up, I would like to decrease the height of #wrapper2 accordingly). Here I give you an example to show what I'm trying to achieve. If you try the sample, you'll see that footer stays at too many distance from container. I can make a dirty hack here and make footer top:-200px too but then the scroll bar of the window goes over the footer. <!DOCTYPE html> <html> <head>

Creating a CSS 'path' on hover

我的未来我决定 提交于 2019-12-04 07:31:48
问题 I'm trying to generate a 'nice' CSS menu using (mainly) CSS, but with a tiny bit of jQuery as well: My overall idea is: +------------------------+ | | | | | +---+ | | | | | | |___| | <-- Hover this center piece | | | | | | +------------------------+ +------------------------+ | _ | | |\ | <-- All start moving up to top of screen | \ +---+ | | | | | | |___| | | | | | | | +------------------------+ +------------------------+ | +---+ | | | | | | |___| | | | | || All, but one | | || moves down |

Bootstrap 3.0 : Fixed column

大兔子大兔子 提交于 2019-12-04 07:19:04
Please find my design here : http://jsfiddle.net/2JGQa/ I would like to fix the left column (included testlab_fr, 1er mail, ... , 10eme mail) like my header, how I can do that ? I saw affix but I don't know how to use it. <div class="row"> <div class="col-sm-4"> <div class="row"> <ul class="list-group"> <li class="list-group-item"> <span class="badge">175</span> testlab_fr </li> </ul> </div> <div class="row"> <div class="list-group"> <a href="http://localhost/mailbox/testlab_fr,26860-html" class="link_mail list-group-item active"> <h4 class="list-group-item-heading">1er mail</h4> <p class=

Replacement for `AbsoluteLayout` from Vaadin 8 Framework in Vaadin 10 Flow?

你离开我真会死。 提交于 2019-12-04 06:30:49
The AbsoluteLayout in Vaadin 8 ( Framework ) enables pixel-position-oriented placement of widgets within a layout. While not my first layout of choice, the AbsoluteLayout is suited to porting code from other UI-building platforms that use pixel-position-oriented layout. Example code from the manual : // A 400x250 pixels size layout AbsoluteLayout layout = new AbsoluteLayout(); layout.setWidth("400px"); layout.setHeight("250px"); // A component with coordinates for its top-left corner TextField text = new TextField("Somewhere someplace"); layout.addComponent(text, "left: 50px; top: 50px;"); I

Fixed Div overlaps scrollbar of static div

一世执手 提交于 2019-12-04 06:23:58
I'm having trouble to to style my layout like I want it to. I have a content area #content (the grey you can see in the example image) with a yellow element inside. This div is position:static;height:100%; . Now I have a #left-panel div also, with position:fixed;height:100%; . The problem is, if the content area has not enough space a horizontally scrollbar appears. This will be overlaped of the fixed div. For me it is all logically, but I don't know how to get around this. My scrollbar of the #content -element should be visible the whole width of the window. So it would not be a solution for