Prevent absolutely-positioned elements from overlapping with text

情到浓时终转凉″ 提交于 2019-11-30 16:39:41

问题


I have a unique situation here.

Essentially, I have an absolutely positioned block of text, which must be absolutely positioned due to design limitations.

I also have the rest of my text, which is normally positioned. However, I need to prevent my normal text from overlapping with my original text.

Is this possible simply with HTML and inline CSS? I do not have access to JavaScript or external/head-related CSS; only inline styles are available. I have created a simplified version of my CSS with this jsFiddle.


回答1:


Is a solution to create another div (div2) that overlaps the absolutely positioned div (div1), but is itself invisible? Then the rest of the text would avoid overlapping div2...

Sketched this out here: http://jsfiddle.net/VKYwD/8/

Not entirely clear on what your constraints are though.



来源:https://stackoverflow.com/questions/6301719/prevent-absolutely-positioned-elements-from-overlapping-with-text

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!