css-position

Safari absolute positioned div disappear when scroll

独自空忆成欢 提交于 2019-12-10 10:50:35
问题 I have a sidebar that contains some products filters on an ecommerce website and has an absolute position. It works well on all browsers except for Safari on iPad and iPhone. It randomly disappears when the page scrolls. I have tried to use the -webkit-transform: translate3d(0, 0, 0); trick as reported in many articles and other "tricks", but nothing works for me. (iPad Safari scrolling causes HTML elements to disappear and reappear with a delay) You can see the page at http://www

Topmost 'fixed' position div moving with non position div

浪尽此生 提交于 2019-12-10 10:45:48
问题 Consider the following code: div { width:100%; height:64px; border:1px solid #000; } .top-fixed { position:fixed; } .middle-fixed { position:fixed; top:64px; } .bottom { margin-top:128px; #64+64 } <html> <head></head> <body> <div class="top-fixed">Top Fixed</div> <div class="middle-fixed">Middle Fixed</div> <div class="bottom">Bottom</div> </body> </html> For div.bottom, I am using margin-top property so that it does not overlap with the top-most div. But it also brings div.top-fixed 'down'

IE8 absolute positioned elements within button element are wrong

安稳与你 提交于 2019-12-10 10:16:13
问题 Title says it all: absolute positioned children of a button element are wrong in IE8 Here's a fiddle And here's the mandatory piece of code: <button><div></div></button> <style> button{ position: relative; width: 200px; height: 200px; border: 0; background: gray; } button div{ position: absolute; top: 5px; left: 0px; width: 100px; height: 100px; background: red; }​ </style> I've searched and tried everything I could think of. Maybe I should abandon using the button element :-/ What's going on

Can i use position: fixed vertically and and position: absolute horizontally?

别说谁变了你拦得住时间么 提交于 2019-12-10 05:42:11
问题 I have some text at the bottom of my page saying Built By Me in it. I have this in a fixed position 35px away from the bottom and left of the window so it moves as you scroll. What i actually want is to fix it vertically, so it moves as you scroll up and down and is always 35px away from the bottom of the window, but have it positioned 35px away from the left edge of the page (not screen) so it does not move when you scroll horizontally.I checked out this solution Position element fixed

Absolute and fixed positioning together

时光怂恿深爱的人放手 提交于 2019-12-10 03:05:15
问题 As you can see in this page: http://pitchfork.com/ , there are some audio elements on the right side. I've inspected them and they seem to have absolute positioning. But if you scroll down, you'll see that they are fixed. How can achieve this behavior? Can be an element Absolute and Fixed positioned? 回答1: Create a cool fixed scrolling sidebar with no javascript and a few lines of css. Fixed vertical div with flexible horizontal positioning. The fixed div in the fiddle below appears to be

jQuery: Move element by relative value

ぃ、小莉子 提交于 2019-12-10 02:00:46
问题 (Meaning an elements left-value): What's the easiest way to move an element - e.g. 10px to the left (from its current position)? 回答1: It might be that jQuery is overkill and setting margin-left: -10px will do the trick. You can get an element's offset() relative to the document: http://docs.jquery.com/CSS/offset That'd give you the left,top,etc. Then you might have to position the element using the css like so. subMenu.css({ position: 'absolute', zIndex: 5000, left: left, top: top }); 回答2:

Bootstrap modal at top of iframe regardless of scroll position. How do I position it on screen?

纵然是瞬间 提交于 2019-12-10 00:54:32
问题 When embedding a Bootstrap app in an iframe, modal dialogs always open at the top of the iframe, not the top of the screen. As an example, go to http://getbootstrap.com/javascript/ and open an example modal on the page. Then using the sample code below which places the same bootstrap page in an iframe, find a modal and open it: <html> <head> </head> <body> <table width="100%"> <tr><td colspan="2" style="height:80px;background-color:red;vertical-align:top">Here's some header content I don't

Position relative in firefox causing problems with google-map-markers clickable area

好久不见. 提交于 2019-12-10 00:03:04
问题 The clickable area around a google-map-marker is shifting/misplaced when text (or other content) is added before the map-div. It is working fine in chrome, ie etc. - only firefox seems to cause this problem (as far as I can see). When - in web-console - changing map-div's elementstyle from 'relative' to 'static' the problem is gone. The code below is borrowed from googles map-examples - if I uncomment the lorem-text the map-markers clickable area is moving/misplaced. Any suggestions on how to

Bootstrap 3.0 : Fixed column

喜欢而已 提交于 2019-12-09 18:22:36
问题 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"

CSS relative positioning with negative value and height

本秂侑毒 提交于 2019-12-09 17:50:20
问题 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: