Questions tagged [overlap]

Two or more elements overlap when they partially or totally cover one another.

Two or more elements overlap when they partially or totally cover one another.
The way to find if the elements overlap or not is to test if one elements begins before the second one ends, while the second one begins before the first one ends.

For example, here are all of the ways two lines can overlap:

1.
s1|--------|e1
s2|--------|e2


2.
s1|-------|e1
     s2|--------|e2


3.
     s1|--------|e1
s2|--------|e2


4.
s1|-------------------|e1
     s2|--------|e2


5.
     s1|--------|e1
s2|-------------------|e2

Note that s1 is always smaller than e2, while s2 is always smaller than e1.

This is not the case when the two lines do not overlap:

1.
s1|--------|e1
                 s2|--------|e2


2.
                 s1|--------|e1
s2|--------|e2

Note that either s1 is bigger then e2 or s2 is bigger then e1.

The actual data type of the elements is completely irrelevant as long as it's comparable.

Therefore, to check if two elements overlap each other, all you need to do is this: (pseudo code)

If a.Start < b.End AND b.Start < a.End Then
    Overlap
Else
    No overlap
1695 questions
0
votes
1 answer

Saving a counter in libGDX

I am developing a game in libgx for android. I have a counter on the screen that increase when i touch something. In that game you can die, but i want to save the highest score that the player had. I don't know where to begin with. I am new to…
user2959870
  • 82
  • 3
  • 23
0
votes
1 answer

Divs Go On Top Of Other Div When Zoom

I'm currently working on a website, however I've ran into a problem. At default page zoom (!00%), my website looks fine, however for some reason when I zoom in, my side bars go on top of my main div. Check the screenshots:…
0
votes
1 answer

I have 2 divs that overlap when re-sizing browser

As you can see, I have the image set to responsive so it stretches accordingly when re-sizing the browser, so the image fits and keeps its ratio. That's how I want it. What I don't want is the music player to overlap with the image. I'd also like to…
SakreD
  • 27
  • 6
0
votes
1 answer

how to make sure both files remain open when comparing two files

I have two fairly big files, each containing a list of intervals with (start, end) information. I have to output the lines in the first file that contain intervals that DO NOT overlap with those in the second file, given that a certain string is in…
biohazard
  • 1,867
  • 7
  • 23
  • 38
0
votes
2 answers

Input email field and submit black dot has been overlapped when I resize the screen

I have an email field with a black dot submit button in my header of the website under a black bar. Here when I resize the screen (90%,110%), the email field and black dot submit button have been moved around the layout. Please help with this…
Prabu
  • 39
  • 1
  • 8
0
votes
1 answer

Why does the dropdown menu become transparent when it overlaps the "container" div?

The menu and everything works well on this trial site....but it acts weird when I click on the menu and the dropdown menu items appear. Here is what I have put together so far: http://jsbin.com/tifuhute/36/ What happens is that everything that…
Elysium
  • 173
  • 7
0
votes
2 answers

Dates range containing with infinite intervals using ifs

I have a function in Oracle that checks if the first date contains the second one. There is no problem with it, because [a, b] contains [x, y] if x => a and y <= b and x <= y. Works fine for defined start/end date 1 and start/end date 2. But now I…
Nickon
  • 8,180
  • 10
  • 52
  • 105
0
votes
1 answer

Overlap HTML border bottom

I'm making a Navigation bar. It has a border at the bottom. Now I want to give the active class a other color for the border. It should be in place of the navigation border, but it shows above it. How can I put the blue line on the place of the…
Matt
  • 59
  • 7
0
votes
1 answer

Items added to a Panel are overlapping.

When I'm adding items (RadioButtons) to a panel, they are displayed on top of each others : foreach (var item in items) { this.ContentPanel.Children.Add(new RadioButton() { Content = ... ); } Why is that and how can I make them appear on top of…
lior
  • 51
  • 8
0
votes
0 answers

ray overlap with semicylinder in c++

I am looking for a way to find out the length of a ray lying between two finite semi cylinders.I have a structure resembles a a finite semi cylinder of some thickness which i can assume to be made up of two semi cylindrical surfaces and multiple…
sarath
  • 69
  • 2
  • 7
0
votes
1 answer

Bootstrap: Navbar isn't responsive: overlap / breakpoint at sm-sizes

The navbar works fine on large desktops, but if the browser size is beetween about 781px and 1005 px the li tag links don't fit into the navbar and that causes a overlap or breaking into two "lines" (example "Kontakt"). You can see it on my…
user3646958
  • 113
  • 12
0
votes
2 answers

Query 2 fields Date Range Overlap Date Range

So this is a new one, I am thinking. We have an Access query with 2 date fields fdate1 and fdate2. The fdate1 is always the first date, and fdate2 is always the second. The two are a range. What we need to do is query the table to find all the…
missscripty
  • 509
  • 1
  • 10
  • 26
0
votes
1 answer

dygraphs - chart is overlap fixed positioned div

I have nav bar with fixed position and static div with dygraph. Nav bar works normally, but when it overlapping dygrahp it becomes transparent and not clickable. here is my nav css: nav{ background-color:#fff; border:1px solid #dedede; …
user1835337
  • 646
  • 1
  • 9
  • 31
0
votes
1 answer

CSS drop down menu - overlapping elements

I've made a drop-down menu but when I hover over a parent category, the children appear crowded and overlapping. It seems the children 'elements' are not being placed neatly one below the other; rather, they overlap each other. I've tried fixing it…
user3579613
  • 103
  • 10
0
votes
1 answer

CSS - Vertical text overlap another div content

the following div contains vetical text (is the page title at left of the page). The problem is that the vertical text overflow its div and overlap another content div. I've made something like this: