The Little Guy Posted April 24, 2012 Share Posted April 24, 2012 What is the best way to have two absolute positioned div's that don't sit on top of each other? Quote Link to comment Share on other sites More sharing options...
teynon Posted April 24, 2012 Share Posted April 24, 2012 The best way... would be to make them not absolutely positioned... What are you trying to do? This question is so broad that I don't think you can get a real answer. Perhaps a graphic showing what you are trying to do? Quote Link to comment Share on other sites More sharing options...
haku Posted April 25, 2012 Share Posted April 25, 2012 The best way would be to set their position so that they don't overlap. Quote Link to comment Share on other sites More sharing options...
The Little Guy Posted April 25, 2012 Author Share Posted April 25, 2012 I am making custom drop down menu's, and when the div is expanded, everything moves all weird. So the best I could come up with so it doesn't happen is to absolutely position them. Here is an example of two within a table. The one on the right is the year/month/day, but the month and day are hidden behind the year drop down. Quote Link to comment Share on other sites More sharing options...
haku Posted April 25, 2012 Share Posted April 25, 2012 With a situation like this, you are just going to have to tweak the widths and the position until it works well for you. Absolutely positioned elements have no awareness of where any other elements are located (with the exception of their relative parent), so if you are going to absolutely position them, you just need to do it all manually. Quote Link to comment Share on other sites More sharing options...
The Little Guy Posted April 25, 2012 Author Share Posted April 25, 2012 Well I threw them into a table which fixed the issue for now... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.