how to put an absolute positioned div on top of a absolute positioned div ?
Expand Post »
i have two divs. one is absolutely positioned to be centered. in the center of the page.
i have a div inside it. i need it to be positioned absolutely but not centered like the first div. here is a screenshot of what i have:
(see atachment i guess? does anyone know how to fix it so its over the frame in the center and not being cut off? (it used tobe absolutely centered like the bigger div but it would overlap at the top because the two images arent the same porportions
Re: how to put an absolute positioned div on top of a absolute positioned div ?
Have you tried using z-index? How come you can't just add a few pixels to the "top:" of the inner div to move it down a bit? Will it just cut off the bottom?
Re: how to put an absolute positioned div on top of a absolute positioned div ?
absolute is exactly what you put it at, so I would recommend z-index to bring forward what you want on top.
Then I would add margins to bring the things down an padding to bring the text in, further more did you add size and width to what you want displayed or are you just letting it auto assign?
Try adding a size and width this usually will solve it. If it doesn't play with the margin and padding to position it in and out.
Have you tried using z-index? How come you can't just add a few pixels to the "top:" of the inner div to move it down a bit? Will it just cut off the bottom?
i think z-index will solve this, make z-index bigger for the top <div>
ex
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Previous Thread in HTML and CSS Forum Timeline:lightbox