homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderators: not2easy

CSS Forum

wrapping content around an absolute div?

5+ Year Member

Msg#: 4404462 posted 4:16 pm on Jan 6, 2012 (gmt 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)




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

Msg#: 4404462 posted 4:47 pm on Jan 6, 2012 (gmt 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)?


5+ Year Member

Msg#: 4404462 posted 4:53 pm on Jan 6, 2012 (gmt 0)

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

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved