Welcome to WebmasterWorld Guest from 23.20.8.182

Forum Moderators: not2easy

Message Too Old, No Replies

wrapping content around an absolute div?

     
4:16 pm on Jan 6, 2012 (gmt 0)

New User

5+ Year Member

joined:Mar 12, 2010
posts: 6
votes: 0


I'm using a CMS, and I have a "block" that displays above the main content of the page. I want that content to display part way down the page. I set the margin-top which puts the block where I want it, but if I use position:relative the main content starts below the block (leaving white space above) and if I use position:absolute, the main content stays put (as I want) but the block covers up the content.

After a couple hours of searching and trying several ideas I'm still stuck... So, does anyone know a way I can move the block into the main content of the page and have the content wrap around the block? (hope that made sense)

Thanks
4:47 pm on Jan 6, 2012 (gmt 0)

Senior Member

WebmasterWorld Senior Member penders is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:July 3, 2006
posts: 3123
votes: 0


If you want that block to be part of the content, so that the content wraps around it then it needs to be just that... part of the content. No amount of positioning will 'fix' this. Positioning it absolutely takes it out of the flow of the page and allows you to position it above the content. If you allowed for this by creating some white-space in the content then it might work, but could easily break and would not be accessible.

You could perhaps 'move' this block using JavaScript and embed it in the content somehow (after the 3rd paragraph perhaps)?
4:53 pm on Jan 6, 2012 (gmt 0)

New User

5+ Year Member

joined:Mar 12, 2010
posts: 6
votes: 0


Thanks - that's what I figured. Didn't want to add more javascript but seems to be the only option.