css-position

problem with absolute positioning in firefox and chrome

丶灬走出姿态 提交于 2019-11-28 21:15:38
I don't understand why FF and Chrome render my page differently. Here's a screenie of it in firefox: firefox example http://grab.by/65Bn and here's one in chrome chrome: chrome example http://grab.by/65BB fieldset has a relative position and the image has an absolute position. here's the basic structure: <fieldset class="passenger-info"> <legend>Passenger 1</legend> <div class="remove-me"> <img src="/images/delete-icon-sm.png" /> </div> </fieldset> basically the image is declared right after the legend. here's the css for fieldset: .passenger-info { background:none repeat scroll 0 0 #F2F2F2;

Absolute positioning in gmail emails

放肆的年华 提交于 2019-11-28 21:02:26
I have a client who wants to send gift certificates to people who sign up on their site. They want it all designed out, so I can't just send a text email. I'm trying to position text over the image so that it can still be dynamic. I'm trying to do this with absolute positioning. Some email systems love it. Some hate it. Gmail happens to hate it. We're using MailChimp for the campaign. Here is the full source of the email. Following that is just the snippet that isn't working. <html> <head> <!-- This is a simple example template that you can edit to create your own custom templates --> <meta

How to place div inside another div to absolute position?

半世苍凉 提交于 2019-11-28 18:49:25
For instance, I would like to create a template like in the image below. How do you position each div inside the container to its absolute position? I would prefer without needing to use float-attributes. Any short examples would be appreciated. You can use absolute and relative positioning. for example html <div id="container" class="box"> <div class="box top left"></div> <div class="box top center"></div> <div class="box top right"></div> <div class="box middle left"></div> <div class="box middle center"></div> <div class="box middle right"></div> <div class="box bottom left"></div> <div

How to position a Bootstrap popover?

北慕城南 提交于 2019-11-28 16:57:48
I'm trying to position a Bootstrap popover for a trigger that sits on the far top-right corner of a 960px wide web page. Ideally, I'd position it on the bottom and move the arrow with CSS (so the arrow is on the top-right of the popover). Unfortunately the 'placement':'bottom' positioning is not enough, since it will center it below the trigger. I'm looking for solution that will place the popover statically below and on the left of the trigger. This works. Tested. .popover { top: 71px !important; left: 379px !important; } Mick Simply add an attribute to your popover! See my JSFiddle if you're

How to remove Left property when position: absolute?

一曲冷凌霜 提交于 2019-11-28 16:54:24
问题 I'm overriding the site CSS to an RTL version when specific language is chosen. I have an element which has to have absolute positioning. In the LTR version, I do left: 0px; and it's aligned to the left; in the RTL version I want to do the opposite with right , but the left property isn't overridden so it still stays to the left. I've tried hacking with !important , but that didn't work. I've tried setting left: none , but that didn't work. How can I either set it to none or remove it

In jQuery how can I set “top,left” properties of an element with position values relative to the parent and not the document?

你离开我真会死。 提交于 2019-11-28 16:46:09
.offset([coordinates]) method set the coordinates of an element but only relative to the document. Then how can I set coordinates of an element but relative to the parent? I found that .position() method get only "top,left" values relative to the parent, but it doesn't set any values. I tried with $("#mydiv").css({top: 200, left: 200}); but does not work. To set the position relative to the parent you need to set the position:relative of parent and position:absolute of the element $("#mydiv").parent().css({position: 'relative'}); $("#mydiv").css({top: 200, left: 200, position:'absolute'});

Fixed position navbar only clickable once in Mobile Safari on iOS5

一笑奈何 提交于 2019-11-28 16:24:27
I'm using Twitter Bootstrap to style an iPad optimized website and am running up against an interesting bug in Mobile Safari on iOS5. After tapping on an anchor link in the fixed position navbar, it correctly takes me to that anchor. However, I am then unable to click on any other links in the navbar until after I have scrolled the page. The problem appears to be in Bootstrap itself, since the Bootstrap site has the same issue: http://twitter.github.com/bootstrap/ Any suggestions for how to work around this? The code below reproduces the issue. Note if you click on the "Test JS" or "Test

Absolute positioning ignoring padding of parent

徘徊边缘 提交于 2019-11-28 15:18:41
How do you make an absolute positioned element honor the padding of its parent? I want an inner div to stretch across the width of its parent and to be positioned at the bottom of that parent, basically a footer. But the child has to honor the padding of the parent and it's not doing that. The child is pressed right up against the edge of the parent. So I want this: but I'm getting this: <html> <body> <div style="background-color: blue; padding: 10px; position: relative; height: 100px;"> <div style="background-color: gray; position: absolute; left: 0px; right: 0px; bottom: 0px;">css sux</div>

Have a fixed position div that needs to scroll if content overflows

匆匆过客 提交于 2019-11-28 15:17:02
I have actually two issues, but lets resolve the primary issue first as I believe the other is easier to address. I have a fixed position div on the left side of the scroll for a menu. Right side is a standard div that scrolls properly. The issue is that when the browser view-port is too small to see the entire menu.. there is no way to get it to scroll that I can find (at least not with css). I've tried using different overflows in css, but nothing makes the div scroll. The div that contains the menu is set to min-height:100% and position:fixed.. both attributes I need to keep. The div

Popup/tooltip position in JQueryMobile

前提是你 提交于 2019-11-28 14:43:26
I want to show a tooltip under the mousecursor. Since JQueryMobile doesn't have any widget for this, I use the Popup widget (which comes very close). When showing the popup, I can specify X and Y coordinates. But the problem is it centers the popup based on X and Y. And I want to display it on the right-side of the mousecursor, not right under it (because that makes the text hard to read because the cursor is over it). How can I show a popup this way? The only thing I can think of is measuring the width of the popup element, and correct the coordinates based on the width/height of the popup.