css-position

Disable horizontal scrollbar due to a DIV with position:absolute which is outside of the page

China☆狼群 提交于 2019-11-30 03:13:28
I have an absolutely positioned element that is "outside" of the page, but I want browsers (I am using Firefox 3) not to display horizontal scrollbars. It seems that displaying a div that is positioned to the left (e.g. having "left: -20px") is okay, and no scrollbar is shown. However the same thing on the right ("right: -20px") always shows the scrollbar. Is it possible to hide the scrollbar, but to keep standard scrolling possible? I mean I only want to disable scrolling due to this absolute-positioned element, but to keep scrolling due to other elements (I know I can disable scrollbars

How do I determine if a window is off-screen?

空扰寡人 提交于 2019-11-30 02:44:36
问题 In Windows XP and above, given a window handle (HWND), how can I tell if the window position and size leaves the window irretrievably off screen? For example, if the title bar is available to the cursor, then the window can be dragged back on screen. I need to discover if the window is in fact visible or at least available to the user. I guess I also need to know how to detect and respond to resolution changes and how to deal with multiple monitors. This seems like a fairly big deal. I'm

Single finger Scrolling for inner contents (div/iframes) in iPhone Mobile Safari

三世轮回 提交于 2019-11-30 02:31:21
Sub: iPhone mobile safari web application I need to keep some parts of a web page visible even when a user scrolls. The CSS property position:fixed does not work as expected. Using the overflow:auto property on or needs two-finger scrolling which is not what I want. Is there any way to provide single finger scrolling on the inner 'div' or 'iframes' contents using javascript or iphone safari Touch API (touchMove event)? Arvind Thyagarajan In CSS (for iOS 5): -webkit-overflow-scrolling: touch; Natively it is not possible, either with a div or iframe, so it must be solved with javascript

Position fixed on chrome mobile causing element to move on scroll up/down

扶醉桌前 提交于 2019-11-30 01:40:01
I'm facing this strange issue that looks like a bug on Chrome mobile. I have a div with position:fixed; aligned to the top right corner of the screen. On desktop, it works fine (it stays in place), in mobile, however, the div is moving when I scroll up or down. I made a video to explain it better: https://www.youtube.com/watch?v=gCgN6ULkcMg On scroll up works fine on scroll down, a piece of the div with position:fixed disappears outside the viewport I tried to isolate the problem on a fiddle, but couldn't reproduce it. So I encapsulated the entire website in a fiddle, and the issue stopped

How do you do relative positioning in WPF?

笑着哭i 提交于 2019-11-30 01:31:28
How can you relatively position elements in WPF? The standard model is to use layout managers for everything, but what if you want to position elements (on a Canvas, for example) simply based on the position of other elements? For example, you may want one element (say a button) to be attached the side of another (perhaps a panel) independent of the position or layout of that panel. Anyone that's worked with engineering tools (SolidWorks, AutoCad, etc.) is familiar with this sort of relative positioning. Forcing everything into layout managers (the different WPF Panels) does not make much

How do I centre absolutely positioned content of unknown width?

半城伤御伤魂 提交于 2019-11-30 00:06:26
Before someone asks me why the hell I would want to do this let me come straight out and tell you. That way one of you clever peeps out there can tell me a far better way... I'm making a viewer for paintings which should stretch to fill the page, well 90% of the height of the screen to be precise. I want to fade the paintings in one over the other and want to center each of them in the middle of the screen. To fade the paintings in over each other I need to position them 'absolute' to stop them from stacking. Here's where the trouble comes. Ever since I've set them to absolute, every method I

unable to get the scroll when position:fixed — elements disappears form the screen

我是研究僧i 提交于 2019-11-29 23:32:39
问题 Top Bar (fixed) - As seen on twitter and facebook,tried to mimic the same on a web project that i'm working on -- no matter how much i try,the content disappears beyond scroll.Tried this tutorial http://www.sohtanaka.com/web-design/facebook-style-footer-admin-panel-part-1/ but,the contents in that overlaps when resolution is changed or when on zoom.Do not want that -- as we see on twitter/FB - want the scroll to come up on zoom (or lower resolutions) Been flocking around this issue since

Center an item with position: relative

大憨熊 提交于 2019-11-29 23:29:33
I've got a menu that appears on hover over an absolutely positioned div. All of the menu items have to be relatively positioned because the absolutely div will appear multiple times on a page and will appear in multiple sizes in one instance. How would I center multiple items with position: relative both vertically and horizontally when I won't know the the size of the parent div? I know the position: absolute trick with negative margins, but this situation calls for something different. Here's the code: .OuterCase { position : absolute; width : 100%; height : 100%; text-align: center; }

Overlay Divs Without Absolute Position

雨燕双飞 提交于 2019-11-29 22:58:34
What follows is a long explanation, but it's the only way to effectively communicate the issue I'm trying to resolve... I am (somewhat desperately, and entirely unsuccessfully) trying to overlay divs without the use of absolute positioning. The need stems from a paypal cart that I place on the site via a Javascript. The cart's natural position is hard against the top margin of the webpage (not its containing div, which is #wpPayPal , or the wrapper for this div, #main ). The script's author strongly recommends against customizing the cart's stylesheet, but I found a tutorial he wrote that

disappearing position fixed header in ios7 mobile safari

巧了我就是萌 提交于 2019-11-29 18:52:46
问题 I've been messing with this all day and can't seem to find a fix. I've got a simple ul that acts as a fixed header with the following css: body { width: 100%; height: 100%; min-height: 100%; } .stream .header { position: fixed; width: 100%; height: 41px; top: 0; right: 0; left: 0; z-index: 10; margin-bottom: 10px; list-style: none; } The content below the header has the following css: .stream .stream-content { position: relative; padding-top: 41px; -webkit-transform: translate3d(0, 0, 0); }