css-position

How to keep scroller in view inside of Fixed position div with top pixels pushing it down?

泪湿孤枕 提交于 2019-12-11 03:25:36
问题 http://jsfiddle.net/leongaban/6rd2hhpq/8/ I'm working with a fixed position div and making elements scrollable from inside it. Similar to this problem here. I was able to get the scrollbars to show up, my problem is that I have a fixed header, and my fixed sidebar has to be pushed down in my view. This allows the user to keep scrolling past the browser window so you lose sight of the scroller. Is there anyway to keep the scrollbar in view with my example? So that when the scroller hits and

position: fixed with margin: auto in IE9/10

北慕城南 提交于 2019-12-11 02:04:31
问题 I've made a sticky header for a responsive site where the header also is centered with margin: 0 auto . It works in Chrome/Firefox/Safari/IE8 but not in IE9+. Minimal markup: <div class="viewport"> <header class="banner"> </header> </div> And the style: .banner { position: fixed; top: 0; left: 0; right: 0; width: 100%; max-width: 1024px; margin: 0 auto; } In IE9+ the header is stuck to the left side. 回答1: You need to specifically add width: 100% to your element in question. Demo css .banner {

Position fixed with 100% height

荒凉一梦 提交于 2019-12-11 01:35:27
问题 I want use 100% height for MAIN id but when I put it 100% height to main id, creativity class is placed on the main. when use pixel for main in different device its look different. is there any solution to fix it ? #main { width: 100%; height: 675px; } .main { position: fixed; width: 100%; height: 100%; background: url(/images/logo/logo.svg) center no-repeat #ffcc00; } .introduction { position: relative; display: inline-block; z-index: 2; width: 100%; height: auto; background: #fcd803; text

anchor links not working properly on ipad

你说的曾经没有我的故事 提交于 2019-12-10 21:28:44
问题 We have a problem with a fixed element on iPad. You can check our layout here: http://cibology.edoardobiasini.it/ The position:fixed element on the right contains a nav with anchor links to the page. On desktop browsers we have no problems, while on iPad the content doesn't scroll after the first click on the nav, unless you force the page to scroll with the fingers. Does anybody have any advice?? 回答1: Found the solution here: https://stackoverflow.com/a/9198836/1145706 I've solved this with

css absolute position inside table-cell: strange Firefox display

痴心易碎 提交于 2019-12-10 19:13:39
问题 I have a simple horizontal menu with two levels. This menu stretches to 100% width of the wrapper. Here is the fiddle: http://jsfiddle.net/gpsgv/ If you run this fiddle in any browser except Firefox, it displays the following, as expected: If you run this fiddle in Firefox, it displays the following: Looking at the code, the second level lists are absolutely positioned inside the first level items (which have display: relative style). So, setting the left: 10px style to second level list

How an absolutely positioned element overlaps the following/next element without any z-index?

不打扰是莪最后的温柔 提交于 2019-12-10 17:54:28
问题 Please see my fiddle here. I'm trying to understand how the absolutely positioned "red hexagon" icon overlaps the input/textarea element without a z-index ? <style> .c-icon-error-a { height: 17px; width: 18px; } .c-icon-v2 { background-image: url("http://i.stack.imgur.com/RSjot.jpg"); background-repeat: no-repeat; display: inline-block; height: 14px; vertical-align: middle; width: 14px; } .c-icon-error-a { margin: 4px; position: absolute; } ul li { margin-bottom:15px; } </stlye> <body> <ul>

Need to fix an image to a specific spot on a page

女生的网名这么多〃 提交于 2019-12-10 17:19:48
问题 I need to fix a .gif image to a specific spot on my home page. I've placed the image in my HTML, and "position:fixed" doesn't do what I want - the rest of the page's content scrolls beneath the image. I want the image to stay in the same place at all times. Disclaimer: I know next to nothing about HTML & CSS, so my apologies if this is a very simple question. I've done research, but nothing I've tried seems to work. On a related note, my image changes size depending on what browser I'm

Display text outside of containing element

…衆ロ難τιáo~ 提交于 2019-12-10 16:58:31
问题 I want to achieve this. Keep an eye on the top text 'Happy Fruit' . I want to be overlayed of the box while it's nested inside it. body { background: yellow; padding: 50px; } .slider { width: 100%; height: 650px; margin-top: 40px; background: orange; box-shadow: 0 0 78px 11px #F3286B; } h1, h2 { text-transform:uppercase; color: red; } h1 { font-size: 11vw; } h2 { font-size: 7vw; } <body> <div class="slider"> <h1> Happy Fruit </h1> <h2> HELLO WORLD </h2> </div> </body> If I then go and add a

Inheriting width from Bootstrap container when child is position fixed

岁酱吖の 提交于 2019-12-10 16:38:11
问题 I am trying to have a header div inherit its width from its parent. The header div is position: fixed . The parent is contained inside a bootstrap container. However, as you can see in the code I've created, it is not correctly inheriting the width of its parent - it is adding some extra width from somewhere. This is all very annoying! Any idea how to fix this? .category-body { margin-left: 17% !important; width: 67%; background-color: red; height: 500px; } .category-header { position: fixed;

on mouse over show x on image

大兔子大兔子 提交于 2019-12-10 16:23:40
问题 i want to show X mark on image , which is 24x24 size, for that i take li element and in element <li style="display: inline-block; background: #283038; border: 1px solid #161b1f; margin: 5px; height: 25px; padding: 2px; border-radius: 3px;"> <ul> <li style="width: auto; float: left;"> <img class='tagImage'/> <span class='removeitem'>X</span> </li> </ul> </li> something like this : my problem is in html i am not able to place X icon on correct place. as per screenshot 回答1: Use CSS Positioning