css-position

Replacement for `AbsoluteLayout` from Vaadin 8 Framework in Vaadin 10 Flow?

泪湿孤枕 提交于 2019-12-06 02:01:33
问题 The AbsoluteLayout in Vaadin 8 (Framework) enables pixel-position-oriented placement of widgets within a layout. While not my first layout of choice, the AbsoluteLayout is suited to porting code from other UI-building platforms that use pixel-position-oriented layout. Example code from the manual: // A 400x250 pixels size layout AbsoluteLayout layout = new AbsoluteLayout(); layout.setWidth("400px"); layout.setHeight("250px"); // A component with coordinates for its top-left corner TextField

Fixed Div overlaps scrollbar of static div

一笑奈何 提交于 2019-12-06 00:54:23
问题 I'm having trouble to to style my layout like I want it to. I have a content area #content (the grey you can see in the example image) with a yellow element inside. This div is position:static;height:100%; . Now I have a #left-panel div also, with position:fixed;height:100%; . The problem is, if the content area has not enough space a horizontally scrollbar appears. This will be overlaped of the fixed div. For me it is all logically, but I don't know how to get around this. My scrollbar of

Why does Firefox 4 absolutely position fieldset legends differently than other browsers?

好久不见. 提交于 2019-12-05 23:34:14
Why does Firefox 4 absolutely position fieldset legends differently than other browsers? Test page: <!DOCTYPE html> <html dir="ltr" lang="en"> <head> <meta charset="utf-8"/> <title>Test</title> <style type="text/css"> * { margin: 0; padding: 0; } body { font-family: Tahoma, Arial, sans-serif; font-size: 62.5%; } #wrapper { margin: auto; padding: 1em; width: 720px; } form { width: 670px; padding: 25px; background-color: #ffffff; /* White */ color: #000000; /* Black */ border: 1px solid #cccccc; /* Gray */ font-size: 12px; } fieldset { position: relative; border: 1px solid #cccccc; /* Gray */

Using scrollTop inside of a fixed element with overflow-y:scroll

你离开我真会死。 提交于 2019-12-05 23:07:21
I can't seem to get scrolltop to work when my content is inside of a fixed position container that has overflow-y: scroll specified. Here is my relevant code: /* some container with many large content blocks inside */ #container { position: fixed; width: 300px; height: 300px; overflow-y: scroll; } /* button that has a data-path attribute that specifies where the container should scroll to*/ $(".button").on("click", function(){ var path = $(this).attr("data-path"); var anchor = $("#" + path); var position = anchor.position().top; $("#container").animate({scrollTop: position}); }); I believe

jQuery offset returns invalid value for <span> or inline <div>

ⅰ亾dé卋堺 提交于 2019-12-05 19:54:12
I've created a test case, please check it out as it illustrates my issue: http://jsfiddle.net/jAD2W/6/ (reduced example thanks to @patrick dw) For completeness, this code has also been added to the bottom of this post. Basically, whenever I get the offset of a span element or inline div element, the top value is larger than it should be. When you mouse-over the image in the example, it should stay at that absolute position. Unfortunately, it appears to be moved down. What is causing it to move down? Removing the span element solves the problem, which indicates that it is caused by the inline

IE8 absolute positioned elements within button element are wrong

佐手、 提交于 2019-12-05 18:51:11
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 here? You need to add an overflow:visible to the button css. Here is a fiddle https://jsfiddle.net

Iframe positioning

纵饮孤独 提交于 2019-12-05 18:22:07
问题 This is iframe code of google translate. <div id="contentframe" style="top: 160px; left: 0px;"> <iframe src="/translate_p?hl=en&ie=UTF8&prev=_t&sl=auto&tl=en&u=http://yahoo.co.jp/&depth=1&usg=ALkJrhjrVT6Mc1tnruB-zgrtu9cyQ1bSeA" name="c" frameborder="0" style="height:100%;width:100%;position:absolute;top:0px;bottom:0px;"></div> </iframe></div> I tried to do something similar with the same div and iframe tags but the html page does not end up like google translate. <div id="contentframe" style=

Display span over input with HTML+CSS

社会主义新天地 提交于 2019-12-05 17:05:38
I want to display a span element over an input element with CSS. How can I do this. My current code: <input type="url" placeholder="e.g. www.google.com" /> <span>http://</span> How can I display the span element on the input element so that the users know there is no need to enter http:// so it would look like if there's already a value in but then it is the span element on the input? I assume I can do that with CSS positioning. I cannot use placeholder as I don't want it to be removed. As you have mentioned you need to use positioning and wrap your input with span into div or some other

button position absolute not working as expected

偶尔善良 提交于 2019-12-05 15:17:24
问题 Can anyone explain why this button is not absolute-positioned to the right? I would expect it to be 3px from every edge. HTML: <div class="wrapper"> <button>Hello world</button> </div> CSS: .wrapper { height: 300px; width: 300px; background-color: #f33; position: relative; } .wrapper button { position: absolute; top: 3px; bottom: 3px; left: 3px; right: 3px; } Also, how is it that the button is able to align its contents vertically? 回答1: button , like most form elements, is a replaced element.

position:fixed not working in chrome 22

ⅰ亾dé卋堺 提交于 2019-12-05 14:11:06
i'm new with html5 and css3. I released my first website last month and now i found out that it's not working well in the new chrome version (22): All the fixed elements are no longer fixed... The navigation bar on the top of the screen for example. it was fine only a week ago and i have no idea why now it's not. This is the website: www.biofilter.co.il As far as i can tell, it's still working fine in Firefox and IE. Does anyone has an idea what's going on and what could be the reason? George Your problem is likely caused by Chrome reworking how position:fixed elements handle stacking of z