[pmwiki-users] floats and vspace

Hans design5 at softflow.co.uk
Fri Mar 25 10:17:55 CDT 2011


Friday, March 25, 2011, 2:45:12 PM, Patrick R. Michaud wrote:

> The problem is that the second and third paragraphs are empty
> except for the floating span content.  Therefore the browser thinks
> the paragraphs have no display content of their own to give the
> class='vspace' margin of the subsequent paragraphs something to 
> "push against". ...

> If you're wanting to do this without any paragraph content, 
> you'll likely need to figure out a way in CSS and/or wikistyles
> to force the (empty) paragraphs to take up vertical space in 
> the display.

thanks Patrick, that seems to be it!

I now get the desired display by adding to css
a min-height for p.vspace (excluding the div.vspace case):

  p.vspace { margin-top:1.33em; min-height:1.33em; }

At least it looks right in Firefox 4, and MSIE 8, so might be good
for some other browsers too.

I did not need to add some content artifact, via cs or otherwise.
And authors don't need to learn to insert [[<<]]
after paragraphs with floats only, which was important for me
to avoid.

  ~Hans




More information about the pmwiki-users mailing list