Questions tagged [absolute]

In CSS, the `absolute` value of the `position` property will cause an element to be positioned relative to its first non-static parent element.

Description

In CSS, the absolute value of the property will cause an element to be positioned relative to its first non-static parent element.

Example

#example { 
    position: absolute; 
    top: 20px; left: 20px; 
}
1341 questions
15
votes
2 answers

Django Get Absolute URL

I want to get absolute url in templates. I can't do with url. It gives me a relative URL. I need to get this: http://domain.tld/article/post but Django gives me just /article/post I played with settings.py but it didn't work. (debug=false, allowed…
neuraminidase7
  • 486
  • 2
  • 7
  • 19
15
votes
4 answers

Get position of element by JavaScript

I've seen dozens of scripts that can catch the x and y position of an element/object within the page. But I am always having trouble with catching the x and y when the webpage is using margins at the body, or other elements, absolute/relative…
Johnny
  • 151
  • 1
  • 1
  • 3
13
votes
3 answers

position absolute left:50% does not position span in the middle

I have a wrap div and inside I have a position absolute to the wrap as it is an icon from Icomoon and I need to be part of the background. And then, at the same level that the , another div, and inside this I have a

, a

, an…

eve_mf
  • 795
  • 3
  • 12
  • 36
13
votes
4 answers

Text is breaking using absolute positioning

I have a small challenge that I haven't found any solution on Stack Overflow. That's what I got: And that's how I'd like it: To produce this title effect I'm using absolute position. I don't even know the width and the height from my title. So,…
Caio Tarifa
  • 5,973
  • 11
  • 46
  • 73
12
votes
5 answers

How do I get the absolute position of a mouse click from an onClick event on the body?

I am trying to get the absolute position (top and left) of a mouse click relative to the browser/body, not any parent elements within the body. I have a listener bound to the body, but e.pageX and e.pageY are giving me the position relative to a…
Aaron Silverman
  • 22,070
  • 21
  • 83
  • 103
11
votes
1 answer

absolute position on top of react-navigation nav header

I'm making a loading screen and I've set it to absolute position the entire screen. However when using react-navigation it does not seem to cover the header. Is there a way to place my component on top of the navigation library's header component?…
Turnipdabeets
  • 5,815
  • 8
  • 40
  • 63
11
votes
4 answers

Horizontal scrollbar appears with overflow content on right but not on left?

I have an element with position: absolute in body with some part of it to the left from left side. Demo fiddle * { overflow: visible; } #test { position: absolute; height: 100px; width: 100px; left: -50px; background-color:…
Vasily Liaskovsky
  • 2,248
  • 1
  • 17
  • 32
11
votes
2 answers

Is it possible to use pseudo-elements (:after, :before) inside a table row?

I want to add absolutely positioned element as an :after (of :before) of a table row. Look at this: table { border: 1px dotted gray; border-collapse: collapse; border-spacing: 0; td { padding: 0; margin: 0; width: 100px; …
Aleksandr Motsjonov
  • 1,230
  • 3
  • 14
  • 25
10
votes
1 answer

How do i properly position absolute divs within twitters bootstrap css framework

I can't seem to get a div to absolutely position within its parent using the twitter bootstrap framework. I have a series of rows that follow a scheme as follows
some content…
Brian
  • 4,328
  • 13
  • 58
  • 103
10
votes
2 answers

Resizable page with min-width and position absolute?

I'm working on a resizable page with a sidemenu to the right, and it almost works as supposed on this simple example: http://pastehtml.com/view/1do8cy9.html The problem though is that position auto and min-width dont react as expected. If you drag…
user653522
10
votes
1 answer

how to force page break between absolutely positioned elements in css

html printing form is designed using absolutely positioned elements. How to force page break between some lines. I tried code below but page1 and page2 appers in first page and empty pages are at end if printed from browser. How to force page1 and…
Andrus
  • 26,339
  • 60
  • 204
  • 378
10
votes
3 answers

Allow absolutely positioned element to be wider than parent absolutely positioned element

Background I have a small one-level CSS flyout menu (well, technically it's an expanding element). It is absolutely positioned at the bottom left of a parent absolutely-positioned element that is fairly narrow. See the second h1 element below:
ErikE
  • 48,881
  • 23
  • 151
  • 196
10
votes
2 answers

Is it possible to use the flex layout to center an absolutely positioned element?

The CSS3 flexbox, or flex, layout allows to easily center an element horizontally and vertically even when its height and width are unknown. Can the flex layout be used to absolutely position an overlay (of unknown height and width) in the center of…
Xavi
  • 583
  • 1
  • 7
  • 13
10
votes
1 answer

#include absolute path syntax in c/c++

For some reason, I need to use the absolute path in #include for my system. Is using #include "D:\temp\temp_lib\temp.h" acceptable? I have tried these different usage and it all seems to work. #include "D:\temp\temp_lib\temp.h" #include…
chris yo
  • 1,187
  • 4
  • 13
  • 30
9
votes
6 answers

CSS Problem - Link (position:absolute) above a Box not work in IE + Opera

I have a link in the bottom of a div-box, which have position:absolute and should overlay the whole div-box. like that: http://jsfiddle.net/UpwvT/4/ In FF and Webkit it works fine, but in IE + Opera the "some text" is still not a link and not…
Jörg Steinhauer
  • 137
  • 2
  • 10
1 2
3
89 90