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
-4
votes
1 answer

Can i put a box in half over another box (without px)?

Is there an optimal solution for my problem? I have a green box with position: relative; and a white box with position: absolute; The absolute box has top: 0; I only wish that the white box is exactly centered (with one half over the green box and…
Andreas
  • 39
  • 1
  • 7
-4
votes
3 answers

why absolute function returns -x instead of x?

I made a absolute function to print absolute values in python programming but its not returning values that what i expected. l1=[1,2,3,4,5,-1,-5,-9,10] def absolute(x): if x>=0: return x else: return -x print(sorted(l1,…
Gambler Aziz
  • 41
  • 1
  • 10
-4
votes
2 answers

Absolute position text issues with Chrome on Mac

I am working on a site, currently in development, and I see that only on Chrome for Mac text with an Absolute position is breaking to two lines. This doesn't happen on Chrome for PC, or Safari. The development link is…
Keith Petrillo
  • 151
  • 3
  • 17
-4
votes
1 answer

Two identically-sized elements with position: absolute. Yet they don't superpose perfectly

I made 2 seemingly identical blocks that contain images. I want to make both blocks superpose eachother perfectly in order to later add some hover-transitions. So I gave a "position: absolute" to one of the blocks, but for some reason it doesn't…
Ben Viatte
  • 485
  • 1
  • 5
  • 16
-4
votes
1 answer

How to get absolute value for a double value within a function (Without using math.h)

how can I get absolute value for the double diff in this case? double cos_delta(double x, double delta) { int n = 1; // n should start with 1 because it is the number of terms double diff = cos_N(x, n ) - cos_N(x, n - 1); // n and n-1 instead…
Saeed
  • 1
  • 3
-5
votes
3 answers

How do you make negative values positive using absolutes?

list_1 = [ 10, 20, 40, -19, -4, 30] desired output = [ 0, 0, 0, 19, 4, 0] I have a list with a lot of values, some positive and some negative. What is the best methodology to changing the values in the list that are negative into the positive?…
1 2 3
89
90