css-position

iOS 5 fixed positioning and virtual keyboard

戏子无情 提交于 2019-11-26 16:58:16
I have a mobile website which has a div pinned to the bottom of the screen via position:fixed. All works fine in iOS 5 (I'm testing on an iPod Touch) until I'm on a page with a form. When I tap into an input field and the virtual keyboard appears, suddenly the fixed position of my div is lost. The div now scrolls with the page as long as the keyboard is visible. Once I click Done to close the keyboard, the div reverts to its position at the bottom of the screen and obeys the position:fixed rule. Has anyone else experienced this sort of behavior? Is this expected? Thanks. I had this problem in

Fixed sidebar navigation in fluid twitter bootstrap 2.0

为君一笑 提交于 2019-11-26 15:36:40
Is it possible to make sidebar navigation stay always fixed on scroll in fluid layout? Note: There is a bootstrap jQuery plugin that does this and so much more that was introduced a few versions after this answer was written (almost two years ago) called Affix . This answer only applies if you are using Bootstrap 2.0.4 or lower. Yes, simply create a new fixed class for your sidebar and add an offset class to your content div to make up for the left margin, like so: CSS .sidebar-nav-fixed { padding: 9px 0; position:fixed; left:20px; top:60px; width:250px; } .row-fluid > .span-fixed-sidebar {

What does “top: 0; left: 0; bottom: 0; right: 0;” mean?

爷,独闯天下 提交于 2019-11-26 15:28:37
问题 I am reading a guide from this site about a technique on centering elements. I read the CSS code, .Absolute-Center { margin: auto; position: absolute; top: 0; left: 0; bottom: 0; right: 0; } And I read the explanation too. But what I don't understand is the part that explains "top: 0; left: 0; bottom: 0; right: 0;". It says, Setting top: 0; left: 0; bottom: 0; right: 0; gives the browser a new bounding box for the block. At this point the block will fill all available space in its offset

How to make fixed header table inside scrollable div?

a 夏天 提交于 2019-11-26 15:25:12
I want to make header of my table fixed. Table is present inside the scrollable div. Below is my code. <div id="table-wrapper"> <div id="table-scroll"> <table bgcolor="white" border="0" cellpadding="0" cellspacing="0" id="header-fixed" width="100%" overflow="scroll" class="scrollTable"> <thead> <tr> <th>Order ID</th> <th>Order Date</th> <th>Status</th> <th>Vol Number</th> <th>Bonus Paid</th> <th>Reason for no Bonus</th> </tr> </thead> <tbody> <tr> <td><%=snd.getOrderId()%></td> <td><%=snd.getDateCaptured()%></td> <td><%=snd.getOrderStatus()%></td> <td>Data Not Available</td> <td>Data Not

Creating a variable height “fixed” header in CSS with scrollable content

陌路散爱 提交于 2019-11-26 14:38:45
问题 I'd like to create a header on the page that doesn't move when you scroll the page. This seems simple, just add "position: fixed" to the style, but then the content appears underneath the header, because the header is "removed from the flow". So the solution I think is to add "margin-top: height" to the content. Whats the best way to solve this when the height of the header is variable? I've got a fiddle that demonstrates the problem: http://jsfiddle.net/waterlooalex/j4Z8F/2/ Providing your

position:fixed when left/top/right/bottom aren&#39;t specified - desired results in FF/IE, but not in Safari

蓝咒 提交于 2019-11-26 13:58:53
问题 Sorry to have to ask yet another position:fixed related question, but reading through various other questions and forum threads hasn't helped me with this one. The code that follows is a simplified demonstration of how I have been using position:fixed in a project to date. My original (mis)understanding of position:fixed is that it initially fixes relative to the first positioned parent container, and thereafter remains in that position regardless of viewport scroll position. I now realise

Absolute Positioning Graphic JPanel Inside JFrame Blocked by Blank Sections

雨燕双飞 提交于 2019-11-26 12:32:52
I'm trying to improve my understanding of Java, particularly Java GUI, by making a puzzle program. Currently the user selects an image, which is cut up into a specified number of pieces. The pieces are drawn randomly to the screen but they seem to be covered by blank portions of other pieces, and not all of them show up, but I can print out all the coordinates. I am using absolute positioning because a LayoutManager didn't seem to work. I briefly tried layeredPanes but they confused me and didn't seem to solve the problem. I would really appreciate some help. Here are the 2 relevant classes:

IE7 relative/absolute positioning bug with dynamically modified page content

主宰稳场 提交于 2019-11-26 12:23:56
问题 I was wondering if there\'s anyone having an idea how to tackle with the following problem in IE7: <!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\"> <html xmlns=\"http://www.w3.org/1999/xhtml\"> <head> <title>IE7 absolute positioning bug</title> <style type=\"text/css\"> #panel { position: relative; border: solid 1px black; } #spacer { height: 100px; } #footer { position: absolute; bottom: 0px; } </style> <script type

How to stick table header(thead) on top while scrolling down the table rows with fixed header(navbar) in bootstrap 3?

自闭症网瘾萝莉.ら 提交于 2019-11-26 11:57:38
问题 Bootstrap layout with fixed-navbar . Having table with so many rows in body. Issue? As i scroll the page navigation-bar will be there because it is fixed. as i scroll more i want table header to be fixed under navigation-bar and the content of table(table-body) scrolls without scroll bar! Something like This - Codepen **Fiddle ** Bootstrap table Working Fiddle after referring to the answer! HTML <!-- Wrap all page content here --> <div id=\"wrap\"> <!-- Fixed navbar --> <div class=\"navbar

CSS: Top vs Margin-top

陌路散爱 提交于 2019-11-26 11:56:48
问题 I\'m not sure if I fully understand the difference between these two. Can someone explain why I would use one over the other and how they differ? 回答1: top is for tweak an element with use of position property. margin-top is for measuring the external distance to the element, in relation to the previous one. Also, top behavior can differ depending on the type of position, absolute , relative or fixed . 回答2: You'd use margin, if you wanted to move a (block) element away from other elements in