ifubad Posted September 2, 2008 Share Posted September 2, 2008 Is there a way to clear an absolute element using css? Quote Link to comment Share on other sites More sharing options...
dropfaith Posted September 3, 2008 Share Posted September 3, 2008 all i can think of is clear:both; css has an element clear Quote Link to comment Share on other sites More sharing options...
TheFilmGod Posted September 3, 2008 Share Posted September 3, 2008 Is there a way to clear an absolute element using css? No. Elements positioned as absolute go out of the flow of the content. It doesn't matter what's on the page, they simply glue right on top. Therefore, why would there be a clear? Clear only works for statically/relatively positioned divs that go with the flow of the document. Quote Link to comment Share on other sites More sharing options...
ifubad Posted September 3, 2008 Author Share Posted September 3, 2008 Clear only works for statically/relatively positioned divs that go with the flow of the document I know clear works with float, but isn't that also being removed from the flow of the document, hence the container collapsing since nothing is considered to be there anymore? Quote Link to comment Share on other sites More sharing options...
haku Posted September 3, 2008 Share Posted September 3, 2008 You are correct, but what does that have to do with absolute positioning? Quote Link to comment Share on other sites More sharing options...
ifubad Posted September 3, 2008 Author Share Posted September 3, 2008 maybe I'm just not understanding the way God explained it only works for statically/relatively positioned divs that go with the flow of the document Since a float is also not considered a part of the flow anymore, but clear works with it, while absolute is also not part of the flow, and clear does not not work with it. Oh well, guess that's just the way it is and I'll have work around that issue. Quote Link to comment Share on other sites More sharing options...
haku Posted September 3, 2008 Share Posted September 3, 2008 As far as I understand it, floats are taken out of the flow of the document in the place they are - they don't get moved to another location. They remain in the same place, they are just not affected by the flow. Absolutely positioned elements are taken out of the flow of the document entirely. Quote Link to comment Share on other sites More sharing options...
ifubad Posted September 3, 2008 Author Share Posted September 3, 2008 I see 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.